I screwed up all my files permissions under a directory, how can I recover. Especially, how to change the files that is non-executable back to read-write-only?What I did wrong was that I chmod all the files and directories executable of the user.
In a terminal (Ctrl+Alt+T) you could remove the executable bit from all files and directories in that path:
Then you could add the executable bit back to all directories:
This would leave you with no files in that path being executable for anyone, except for the directories being executable (searchable) for all users.
If you also want to apply this to all files in subdirectories in that path, add the
If you like to use gui you can also nautilus in terminal (if needed with gksudo) and click on the file, permissions and tick/untick executable.