Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ How do you prevent other users from accessing your home directory in Linux     - Difference in MySQL VARCHAR and CHAR data format (Database)

- Each catalog Detailed Linux (Linux)

- Through the source code to install MySQL 5.6.26 under CentOS6 (Database)

- Linux configuration Samba server (Server)

- Mhddfs: multiple smaller partitions into one large virtual storage (Linux)

- Acting on JavaScript events (Programming)

- Nginx-1.9.7 TCP reverse proxy (Server)

- Download Google Android source code under Ubuntu 4.4 (Linux)

- Linux 4.0+ kernel support for hardware switching module (HW Switch Offload) (Linux)

- Bootstrap 3.3.5 release download, Web front-end UI framework (Linux)

- How to implement large-scale distributed Yahoo depth study on the Hadoop cluster (Server)

- C language preprocessor command (Programming)

- Install JDK 1.7 + Eclipse in CentOS 6.4 in (Linux)

- JavaScript Advanced Programming notes event capture and event bubbling (Programming)

- Intel Graphics Installer 1.0.3 released, support for Ubuntu (Linux)

- Understand the profound discussion of some of the options for wireless encryption (Linux)

- Linux Regular expressions grep and egrep (Linux)

- The Oracle VM VirtualBox use U disk under ubuntu (Linux)

- SQL Server memory Misunderstanding (Database)

- Installation Android IDE development tools, Android Studio 1.5 under Ubuntu (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.
     
         
       
         
  More:      
 
- php for Linux the MySQL extension module installation and configuration (Database)
- How to enhance the security of Linux systems (Linux)
- Variables Python variables (Programming)
- Using PHP MySQL library (Programming)
- Linux network cut package is not fully defragment (Linux)
- Samhain: Powerful intrusion detection system under Linux (Linux)
- How Vim playing a mature IDE (Linux)
- Ubuntu Gnome and Fedora 22 Gnome desktop, extended to achieve global menu (Linux)
- count (*) function in MySQL optimization of InnoDB storage engine (Database)
- Vim custom color (Linux)
- The Java Properties class action (Programming)
- Configuring s3c-linux-2.6.28.6-Real6410 appears Unable to find the QT3 installation (Linux)
- DRBD Principle and Features Overview (Server)
- Java String type time compare the size (Programming)
- APT-mirror using a four-step configuration Ubuntu local depot (Linux)
- The development environment to build Nodejs under Ubuntu 14.04 (Linux)
- About DataGuard three protected mode test (Database)
- SendMail version of Java implementation with attachments (Programming)
- HTTP Client Hints Introduction (Server)
- Java string concatenation techniques (StringBuilder tips) (Programming)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.