I have a box with multiple users on it and I want everyone to be able to have full access to their home folders, but not be able to see the contents of /home/ or another user's home folder (I.E. bob has full access to /home/bob but cannot access or even see the contents of /home/john)

Right now users can see other user's home folders but can't modify what's inside.

How do I prevent them from seeing the contents at all?


Change the permissions of the Home folder...

You need to modify the Home folder's permissions using either:

  • chmod
  • the 'File Permissions' dialog (Nautilus Only)

for chmod

Open a terminal in the home folder and chmod the permissions

chmod go-rwx [usersHomeFolder]

for the 'File Permissions' dialog

  • right-click the usersHomeFolder
  • select 'properties'
  • under the 'permissions' tab change the owner to your user name if it isn't already set, change the group to none, and change other to none.

See this link for more info.

  • Note that the 'File Permissions' dialog method is only applicable to users of Nautilus. In Dolphin or Konqueror (KDE), it's the Permissions tab of the Properties dialog, and in other file managers it could be something completely different. chmod works on all Linux systems though. – David Z Jul 8 '10 at 7:28
  • @David Good point, I kinda realized that when I made the answer but I couldn't give examples of the alternatives since I don't have any experience with them. If you want to elaborate with examples for other file management systems I have changed the answer to Community Wiki for others to improve it. – Evan Plaice Jul 29 '10 at 3:41
  • To fully restrict access use chmod go-rwx. Allowing x (execute) on a directory allows you to access files and sub-directories if you know their name. There are a number of files and sub-directories with well known names. – BillThor Jul 29 '10 at 4:02
  • @BillThor Oops, forgot execute access. AFAIK, execute access allows you to execute scripts by editing a files preferences to make it executable (it has nothing to do with with sub-directories). Either way, it's necessary because application files (like nautilus scripts) are hidden in a user's home folder. – Evan Plaice Jul 29 '10 at 8:56
  • 2
    Execute bit on directories has nothing to do with running scripts, it is executing file access. If you leave the execute bit enabled on a directory, then access to files and sub-directories is enabled. – BillThor Jul 29 '10 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.