Wednesday, May 8, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 706  / 3 Years ago, fri, september 17, 2021, 12:11:52

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.


More From » chmod

 Answers
5

In a terminal (Ctrl+Alt+T) you could remove the executable bit from all files and directories in that path:



chmod a-x /the/screwed/up/path


Then you could add the executable bit back to all directories:



chmod a+X /the/screwed/up/path


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 -R option to both chmods.


[#44475] Friday, September 17, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ampust

Total Points: 133
Total Questions: 109
Total Answers: 111

Location: Reunion
Member since Fri, Jul 22, 2022
2 Years ago
;