xshell linux command line switch user privileges

First, the authority command line in two ways.

1.1 chown -R specified user name, file permissions / folder permissions given to the user to read and write.

/ * 1.0 permission command 
    username permission 1. chown -R specified file / folder permissions given to the user to read and write. 
    
    Demonstrate 
    the root user to create a new 111.TXT file, the command touch 111.txt created touch key 
                                                    delete command rm -rf 123.txt 
    Log in with Zxf Linux users, we found that can not be operated 111.txt file. 
    
    Give him permission to operate 111.TXT file. 
    Authorization command chown -R zxf.txt (r strictly case-sensitive.) Chown -R username authorized files / folders. 
    chown -R zxf 111.txt 
    current user gives a user a designated file / folder rw operation can be realized. (Read-write) 
* /

 

1.2xshell switch users.

Ordinary user has no right to modify the system environment variables

 

 

 

 

 

 

 

 

 

 

Two, chown 777 permissions file / folder

/ *     File 2.chown 777 permissions / folder 
    of the current user to give all users of a particular file / folder can rw (read and write) operation. 
    Provided that the current user has permissions to the file / folder. 
* /

 

Guess you like

Origin www.cnblogs.com/ZXF6/p/11392099.html