Ubuntu: Trying to keep users in their home directory


I have created a user brandon. I am trying to keep brandon in his home directory (/home/brandon/), I would like him to be able to edit/delete/create folder and files, but I don't want him to go to /home/ or anything else above his directory.

I have Webmin/Virtualmin, but I still cannot figure it out. Can anyone explain to me any configs I need to edit or someway I can do it with Webmin?


Don't do it because there are some important files like /bin, /etc, /var which are necessary for normal users.

If you still want to, you just have to work a little bit with permissions.

Suppose you have the following users of your machine:

  • carla - the owner of her home directory
  • lisa - the owner of her home directory
  • root - the superuser

Now the most important thing is, change the permissions.

First open terminal:

sudo -s    chmod 700 /home/user  

It will give no permission to other users on your home directory (/etc, /bin, etc.) and that is what you were asking for.

Because by default it is 755.

Type umask 077 (without sudo helpful in your case)

This will give future files or directories 700 permission.

If you want to check it is working, check through terminal. Don't do it through GUI desktop.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »