Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 25138  / 1 Year ago, sat, december 24, 2022, 6:53:44

I'm very new to Ubuntu. During work on my home pc, I accidentally made the following command:



sudo chmod -R o+x /home


I want to know if it's dangerous to open access for other users and, if so, how can I revert it?


More From » permissions

 Answers
3

This question originally asked about sudo chmod o+x /home and
not sudo chmod -R o+x /home. This answer pertains to that version. This was then re-asked, for the recursive (-R) version
of the command
. Subsequently this question was edited, and more
answers were posted. I've left this answer with the intention that it
may be helpful to others who perform non-recursive chmod
operations on /home.




The command chmod o+x /home gives others--that is, people who don't own /home and aren't in its "group owner" either--execute permissions on /home.



For a folder, execute permissions means something special--it means you can go into the directory and attempt to access files inside it.



/home has o+x set by default. The command you ran changed nothing. /home has to allow "others" to access files inside because it contains all the machine's human users' home directories, and *none of those users is /home's owner or a member of its group owner!



Therefore, you don't have to worry about anything. Furthermore, attempting to "fix" this will break your system. If you were to remove the executable bit for "others" on /home, then no user would be able to access their own home directory. The system would be rendered unusable. You would have to enter recovery mode or boot from a live CD/DVD/USB to fix it. (And the way you'd fix it would be to run a command like what you ran before. Except this time it would have an effect.)



If you have already attempted to "fix" this and broken your system, and you need help fixing it, I recommend posting a new question asking for help. After all, that's a different questions from this one.


[#32072] Sunday, December 25, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
eballxeye

Total Points: 370
Total Questions: 91
Total Answers: 139

Location: Suriname
Member since Sat, Jan 1, 2022
2 Years ago
eballxeye questions
Sun, Jan 8, 23, 18:23, 1 Year ago
Sun, Sep 11, 22, 23:24, 2 Years ago
Tue, Dec 14, 21, 07:15, 2 Years ago
;