TLDR: How can I change permissions of all folders in the computer such that, for "others", the folders loose only readability? In other words, they keep their status regarding "write" and "execute", but loose the possibility of "reading" in case they had it in the first place?
Long version:
While configuring a server (where users can SSH to) for the first time, my first inclination was to try to find out how one could create new users that are allowed to access only their own home/username
folder and subfolders.
However, I found some references (for examples this question/answer) online explaining that that would perhaps not be a good idea because users would of course need to still access some system folders like usr/bin
or usr/lib
and to write to folders like tmp
. Of course, it does make sense. Then, what I have tried to accomplish instead is to have users be able to use what is in the system folders but not see their content.
More specifically, that would mean setting all folders in the system to not be readable to "others" while still maintaining their original status to "others" in respect to writability and executability. For example, a folder with permission 754
would become 750
, a folder with 756
would become 752
, a folder with 755
would become 751
, etc, while a folder with 753
, 752
, 751
or 750
would stay the same. So on and so forth.
This way, no one besides the root would be able to see what is inside any folder besides their home/username
folder and subfolders, but she could still execute and write normally throughout all system folders that originally allowed so.
How could I a do that for all folders? Comments on the possible flaws of this idea are of course welcome too.
750
octal permission for the user's home directories is not enough to prevent the users to access eachother
user's home directories?