Ubuntu – Home folders accessible to other users and should not be, how to fix

home-directorypermissionsSecurity

Why are my home folders accessible by other users on the same system by default? I understand that I can change the permission of the home folders but want to know why this happened?

I have done nothing to make the folders "shareable" and yet I can easily navigate to any users home folder using Nemo 2.4.5 and see all their contents.

This is quite a privacy and security flaw and I'm not sure why it has defaulted this way on my system.

Under Users and Groups (items checked =) (both are administrator accounts)

User 1 = adm, cdrom, dip, lpadmin, plugdev, sudo

User 2 = User 2, sudo

Also of note is why User 2 has User 2 clicked but User 1 does not have User 1 clicked. Both accounts appear to behave exactly the same.

Thank you for any tips in this matter.

Best Answer

The default umask is 022, which allows group and others read permissions (and execute, where applicable) (or 002 if User Private Groups are enabled). If you have a problem with that being the default, file a bug. If you want to change the default, edit /etc/login.defs and change

UMASK       022

to

UMASK       077

And then do:

chmod og-rx -R ~
Related Question