Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

It is very important for what I am doing now.

share|improve this question

You cannot have a user completely unable to read any of the filesystem, because they need to be able to load the executable files of the programs they run, read configuration files, etc.

However, you can certainly make folders or partitions unreadable to users.

sudo chmod -R o-rwx FOLDER

Will make a folder and its contents only readable to the root user (ensure your users do not have permission to use sudo or they will be able to see anything.

Some caveats should be noted. If the folder is a non-linux filesystem (a windows partition, or a FAT32 usb stick, for instance), the permissions will only last until it is unplugged/unmounted. (You can make these permanent using the /etc/fstab file, search AskUbuntu for instructions).

It should also be noted that these permissions are only enforced while Ubuntu is running. If the data is on a removeable drive, plugging it into another computer will allow restrictions to be ignored. If it is on an internal drive, physically removing it or booting another operating system (eg, Linux off a USB stick) will allow the restrictions to be circumvented. For true security you need to look into file or disk encryption.

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.