Linux user Management, user Rights Management, user group management
One: ls-l command explanation
- The first d indicates is the directory, if the file is-, if the connection is L
- The 2nd to 4th rwx represents the creator's operation Rights R Read, w write, x execution
- The 5th to 7th RWX indicates that the file or directory has permission to operate on the owning group.
- The following 3 R-x, in turn, represent the permissions that the file or directory has on other people, here is R read, and x Execute permissions
- The number 2 following the permission indicates the number of connections to the current directory or file;
- The name behind the data that represents the owner of the file or directory
- followed by a name that represents the group of the file or directory;
- The number followed by, for example, 4096, indicates the size of the file or directory
- followed by the date of the day, indicating when the file was created or the last modified time
- Last Name: Indicates the name of the file or directory
II: User Management useradd Add, Userdel Delete, usermod change
Detailed explanation execution command: Man
All user information in file:/etc/passwd file
1:useradd adding users; syntax
2:userdel delete user; syntax
3:usermod Modify user; syntax
Three: User group management
All the group information in/etc/group
Groupadd add a group; syntax
Groupdel Delete a group; syntax
Groupmod more Group;
Four: chmod Rights Management
- R (read) Read 4
- W (write) Write 2
- E (execute) Execution 1
1: As chmod 777 indicates, set permissions, the owner, the group, the other person's permissions are the largest, readable, writable, executable;
2:chmod Mode permission set Note string: [Ugoa] [+-=] [RWXX]
U: Indicates that the file or directory owner;
G: Representation, Group;
O: Indicate, other
+: indicates increased permissions;
-: Indicates cancellation permission;
=: Indicates set permission;
For example: chmod ugo=rwx file; chmod u+r File
V: Chown user owner and group management;
Chown document owner Management or document group management; syntax
For example: Modify the FTP directory;
sudo chown www-data:www-data ftp/
The owner of the modified FTP directory is www-data, and the group is Www-data
VERBOSE command: Man + command