2

Possible Duplicate:
Why can other users see the files in my home folder?

I don't want the others users of my computer to be able to open my home folder. I'm the administrator, how can I do this?

Alfredo
  • 453

1 Answers1

4

In a terminal, run

chmod 700 ~

as your own user. It'll make ~ (your homedir) only accessible to yourself (the root user will also be able to access it, but no one else). To learn more, see http://mywiki.wooledge.org/Permissions

You can also do this via nautilus (the file browser). Just open your home directory in nautilus, right-click in the folder (not on any of the files), choose properties, then the permissions tab, and set the "Owner" permissions to "Create and delete files". "Group" and "Others" you set to "None".

geirha
  • 46,101
  • I was under the impression that your home folder is inaccessible by other users by default, i.e. chmod 700 is unnecessary? – Clive van Hilten Mar 01 '12 at 21:38
  • 2
    Yes it is. To prevent other users from reading the contents of your home directory, you need to remove the read bit (4). To prevent users from descending into directories, the execute bit (1) needs to be removed from the directory as well. At least you need 750 instead of the default 755. Even more restrictive is 700, this prevents the group from reading/descending, but since you are the default group it does not add extra privacy. (I'm using umask=027 myself and 750 for ~) – Lekensteyn Mar 01 '12 at 21:49
  • 1
    See also https://wiki.ubuntu.com/SecurityTeam/Policies#Permissive_Home_Directory_Access – Panther Mar 01 '12 at 22:18