Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Ubuntu with several users and I want to make folders viewable just for a specific user. Any idea how to do it?

share|improve this question

Edit: On second thought, I realized that I may have misunderstood the question. If you want the directory to only be visible to a specific user (i.e. for every other user, that list doesn't even show up in the directory listing), you can't do that without prohibiting other users from listing the contents of the parent directory. So if the directory is /foo/bar then you can remove the x permission on /foo (for everyone but the owner) preventing other users from listing the contents of /foo, but you can't hide /foo/bar specifically (though you can certainly hide its contents).

Old answer:

Make that specific user the owner of the directory and then remove all permissions on that directory for everyone but the owner. In the shell, you'd use chmod to do this:

chmod 700 the_directory

If you're using a filemanager, just remove all the checkmarks in the permissions-tab except the ones in the "User"-column (the exact details depend on the filemanager of course).

share|improve this answer
Awesome thanks! – Jax Aug 24 '10 at 19:50

If you prefer to do this from the GUI, this is explained in the help for the GNOME file browser (known as Nautilus):


Basically, you just select the folder, and then from the menu choose File->Properties->Permissions.

Otherwise, sepp2k's answer is absolutely correct, and txwikinger's link is great if you're interested in an in-depth explanation of unix file permissions.

share|improve this answer

This tutorial explains in all details how to set file permissions in Linux (and therefore also in Ubuntu) such that you can control the access.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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