If your machine is shared by more than one user, then you may need to restrict others from accessing your home directory. In this article, we are discussing the procedure by which you can easily stop unauthorized access to your home folder. As by default any user can access any home directory in Ubuntu.
Basically, when you create a new user, then a home directory is also created at root (/home/) location having read and execute privileges. This gives all the users to read and modify any root directories under that system. Just have at this article to find out how to prevent others from accessing your home directory in Ubuntu 14.04.
Steps to prevent others from accessing your home directory:
Step 1: First open your terminal window and type: “ls -ld /home/your_username” and hit enter.
Step 2: Here, you’ll see a home directory having read, write and execute permission to the root user while others are having read and execute permission only.
Step 3: Now, type: “sudo chmod 0750 /home/your_username” and hit enter to change the permission details discussed in step 2.
Step 4: You’ll be prompted to provide your sudo root password for further proceeding. Just type your password and then hit enter.
Step 5: Now open ‘adduser.conf’ file to set the permission for specific user, for that type: “gksudo gedit /etc/adduser.conf” and press enter.
Step 6: You’ll need to provide your Ubuntu password to perform the administrative task. Just type your password and click “Ok” button as shown in the image below.
Step 7: After that ‘adduser.conf’ file gets pop open, just scroll down to the file and you’ll see default mode is set as DIR_MODE=0755. You can change this according to your wish, basically it defines is read, write and execute permission for owner group and world.
That’s all friends. Keep reading
Leave a Reply