It is very important for what I am doing now.
1 Answers
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.

- 12,367