Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ How do you prevent other users from accessing your home directory in Linux     - JBPM6 Tutorial - Fast Fun JBPM table (Linux)

- Oracle ordinary users show parameter method (Database)

- 2016, the new Node project Precautions (Programming)

- Linux Mint brightness adjustment --xrandr command learning (Linux)

- JavaScript prototype and the prototype chain (Programming)

- Fedora 22 Server how to upgrade to Fedora 23 Beta Server (Linux)

- Batch download files using the explorer under Windows Server 2008 R2 (Server)

- Intruder tools Knark Analysis and Prevention Linux environment (Linux)

- To install network scanning and packet sniffer tool Nmap 7.00 under ubuntu (Linux)

- Golang use Oracle database on Ubuntu 14.04 (Linux)

- Linux common commands: nslookup, ls md5sum, uname, history, etc. (Linux)

- KVM virtualization nested configuration (Server)

- Python dictionary applications get built-in method (Programming)

- Security Knowledge: redirection command application security (Linux)

- CentOS 6.5 installation and simple configuration Nginx (Server)

- JavaScript prototype and prototype chain and project combat (Programming)

- How to force Linux users to change the initial password the first time you log in (Linux)

- GDB remote connections RX Probe online debug program (Programming)

- Zabbix installation under Linux (Server)

- CentOS 5.x install Lua 5.2.3 error (LIBS = -lncurses) (Linux)

  How do you prevent other users from accessing your home directory in Linux
  Add Date : 2018-11-21      
  If you and others share Ubuntu machine, then you may want to set up multiple users, want other users to log on to their account and can only access their own home directory. However, by default, any user can access any one of the home directory.

When you add a new user in Ubuntu, adduser tools for the new account added to a new home directory. By default, the root directory is located below / home / directory, and the name of the account user name. For example, / home / lori. The user's home directory created Ubuntu have other people read / execute permissions, which gives the system all other users can read a number of additional rights outside the user's home directory content. For details, please read our article file permissions in Linux is how it works.

NOTE: When we enter what is mentioned in the text, enter the text in quotation marks, do not enter the quotes, unless we specify otherwise.

You can easily modify your home directory permissions to protect your private files. To check the permissions of your home directory, enter Ctrl + Alt + T to open a terminal window and enter the following command at the prompt, then press Enter. Use your own user name to replace the following "user name."

ls -ld / home / lori
Note: This command contains only lowercase L, not the number 1. (LCTT Annotation: This is totally white to suggest that the vast majority of people can ignore the remarks)

In the beginning of the line that lists the permissions on the file. As we in the article about the Linux permission to speak as part of.

r indicates "read", w stands for "write" and x means "execute." Directory permissions to "d" at the beginning, instead of "-." You will also notice the permissions value accounted for 10 positions. You can ignore the first, followed by a group of three, divided into three groups. The first group is the owner (owner) permission, the second group is a group (group) permissions, and the last group of other people (other or the world) permission.

Thus, the owner of the home directory listed below has read, write, and execute permissions, and belongs to the group and others have read and execute permissions.

To modify these permissions, enter the following line at the prompt and press Enter

sudo chmod 0750 / home / lori
When you are prompted for a password, enter and press Enter.

Note: chmod command uses octal numbers as a way to assign permissions. We are talking about Linux use rights article a different method, which takes a few steps, but may be easier to understand. Octal numbers to specify the permissions, is a faster way. Regardless of the method, as long as you like with a comfortable.

Press the up arrow twice, called again "ls -ld / home / username" command to check the permissions. Note that other people permission are now dash (-), which means that other people can not read, write or execute your home directory anything.

However, with your user and group can read and execute your home directory files and folders. If you do not want anyone except you access your home directory, you can enter "0700" in the chmod command.

NOTE: For more information about the Linux user and group management, please see our article

To close the terminal window, at the prompt enter "exit" and press Enter.

Now, when their systems of other users trying to access your home directory, the following dialog box will pop up.

You may even make Ubuntu use permissions specified when creating a new user. To accomplish this task, you need to edit the configuration file adduser. To edit the file, enter the following command at the prompt and press Enter.

gksudo gedit /etc/adduser.conf
We use gedit to edit the file, you can also use other text editor you want.

NOTE: gksudo command sudo command and seemingly the same, but it is used as root to run graphical applications, and sudo command to run as root command-line program.

In the pop-up dialog box, enter the password to edit your password and press Enter or click OK (OK).

Scroll down to the file in adduser.conf DIR_MODE command prompt, where the default value is "0755." Modify the value to reflect you want to empower the various types of users (owner, is a group, others) of different permissions (r, w, x), as we discussed earlier, "0750" or "0700." Click Save (Save).

(File) menu, choose Exit (Quit) to close gedit from gedit file, you can also click on the top left corner of the X button to close it.

Click on the top left corner of the X to close the terminal window.

Now, your home directory files will remain private. Remember, if you and another user in the same group, you might want for your home directory permissions and the general public excluding group privileges.
- How to view the Linux program or process used in the library (Linux)
- AngularJS - Getting Started with Routing (Programming)
- Transfer files and permissions from Windows to Linux system by Samba (Linux)
- Stunning exclamation point at the Linux command line (Linux)
- To setup CentOS LAMP environment (Server)
- Caffe + Ubuntu 14.04 64bit + CUDA 6.5 configuration instructions (Linux)
- Linux screen command (Linux)
- MySQL service failed to start thinking of settlement under CentOS7 (Database)
- Udev: Device Manager for Linux Fundamentals (Linux)
- Debian (Wheezy) Install Java environment / replace OpenJDK as the SUN JDK (Linux)
- Python cause yum upgrade error (Linux)
- Using Vagrant create cross-platform development environment (Linux)
- Install RAID 6 (Striping double distributed parity) (Linux)
- Wi-Fi hackers use to attack your seven methods (Linux)
- CentOS 6.5 start ActiveMQ being given to solve (Server)
- C ++ Supplements - Virtual Function Principle (Programming)
- VMware virtual machine operating system log Error in the RPC receive loop resolve (Linux)
- Oracle 11g upgrade PSU detailed steps (Database)
- Remote installation of Net-SNMP whole process (Linux)
- cat command uses the Linux redirection merge files (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.