Rights Management Command: chmod
Command name: chmod
Command English Original: Change the permissions mode of a file
Command path:/bin/chmod
Execute Permissions: All Users
Syntax: chmod [{ugoa}{+-=}{rwx}] [file or directory]
[mode=421] [File or directory]
-R Recursive modification
Function Description: Change file or directory permissions
Note
1.U: Owner (user); G: Group; O: Other person (other); +: Increase permissions;-: reduce permissions; =: permission is; r: readable; w: writable; x: executable;
2. Digital representation of permissions
R = 4; W = 2; x = 1 rwxrw-r--= 764; r-x-wx-w-=532;
    
    What the rwx of files and directories mean
File: r:cat/more/head/tail/less
W:vi
X:script command
Directory: R:ls
W:touch/mkdir/rmdir/rm
X:cd
Example: chmod g+w,o-r japanlovestory.list
chmod g=rwx Japanlovestory.list
chmod 640 Japanlovestory.list
Chmod-r 777/tmp/a (recursively modifies the permissions of all directory files under the A directory)
Other Rights Management commands
Command name: Chown
Command English Original: Change file ownership
Command path:/bin/chown
Execute Permissions: All Users
Syntax: chown [user] [file or directory]
Function Description: Change the owner of the file or directory (only root has this permission)
Command name: CHGRP
Command English Original: Change file group ownership
Command path:/BIN/CHGRP
Execute Permissions: All Users
Syntax: chgrp [user Group] [file or directory]
Function Description: Change the file or directory belongs to group example: Chgrp liming Fengjie
Command name: umask
Command English original: the User file-creation mask
Command path: Shell built-in command
Execute Permissions: All Users
Syntax: umask [-S]-s to display new file default permissions rwx
Function Description: Display, set default permissions for files
Example: Umask-s (view default permissions for user-created directories, create a file that does not have umask Execute permissions by default)
Umask 0022 (Show user's permission mask) 022 = 777-755 755 for actual permissions
Umask 022 (set user's permission mask)
Linux Common commands-rights management commands