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?
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?
This question originally asked about
sudo chmod o+x /home
and
notsudo 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-recursivechmod
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.