Linux learning notes 2 permission management command-related links: Linux learning notes a file operation command http://www.bkjia.com/ OS /201211/169196.html 1, chmod command, change the file or directory permissions the first method: www.2cto.com u -- owner g -- owner group o -- other people chmod u + wx chmod g-r chmod o = rwx permissions before execution 644:-rw-r --. 1 root 0 November 18 17:20 dd.txt run [root @ CentOS-Test bak] # chmod u = rwx dd.txt run after limit 744:-rwxr -- r --. 1 root 0 November 18 17:20 dd.txt second method: rwx -- readable writable executable number to represent: R-4 W-2 X-1 [root @ CentOS-Test bak] # chmod 777 dd.txt-rwxrwxrwx. 1 root 0 November 18 17:20 dd.txt [root @ CentOS-Test bak] # chmod 641 dd.txt-rw-r ---- x. 1 root 0 November 18 17:20 dd.txt Note: understanding of rwx file permissions r: indicates you can view the file content, and you can list the file name for the Directory w: indicates that you can write content to a file, and create or delete directories. x indicates that you can execute commands and script 2 and chown commands on the file, change the owner of a file or directory [root @ CentOS-Test data] # chown test bak drwxr-x -- x. 2 test root 1024 November 18 17:37 bak3, umask modify the default permissions of files or folders to view the default permissions of the system, that is, the default permissions for creating files: [root @ CentOS-Test data] # umask-S u = rwx, g = rx, o = rx [root @ CentOS-Test data] # umask 0022 (permission mask value) 0: Special Permission class 022: user permission bit, which is a mask value. The final permission is 777-022 = 755 linux permission rule: the file created by default does not have the executable permission [root @ CentOS-Test data] # touch cc.txt [root @ CentOS-Test data] # ll cc.txt-rw-r --. 1 root 11 October 11 17:59 cc.txt change the default permission for file creation: Use 777-default permission to generate = mask value, it is best not to change the default permission [root @ CentOS-Test data] # umask mask Value