Examples of why a world readable /root directory is bad

permissionsrootSecurity

To add weight to a discussion I'm having, I'm trying to find concrete examples of why having the /root directory world readable is bad from a security point of view.

I have found plenty of instances online of people repeating the mantra that it's really not good to give /root say, 755 perms, but with no further evidence.

Could someone please provide a scenario where a system's security can be compromised if this is the case? The less contrived the better – so, for example, how can a freshly installed Centos system suffer if /root has 755 perms?

EDIT – Thanks for the replies, but so far no concrete examples. To put it another way, how could you use the fact that /root is visible to compromise the system? Are there any examples of programs being installed and assuming that /root is not accessible to everyone?

EDIT 2 – I think the consensus so far is that it's not a great security risk, other than someone not checking perms and using the directory as if it were private to root.

Best Answer

This is not fundamentally any different than the recommendation to prevent other users from reading any other user's home directory.

If the default is world readable, there will be a window of opportunity when you are saving a new file which you intend to keep private. There is always a chance that somebody could copy it before you can chmod go-r it.

Related Question