1. Introduction to file Permissions
There are 9 Linux file permissions, three groups representing, owner, group, others, each group also contains r,w, x three states.
2. Modify permissions based on numbers
R, W, x Three permissions are represented by numbers: R:4w:2x:1 the permissions for each group are added to the above three. such as permission for; [-rwxrwx---]owner:rwx = 4 + 2 + 1 = 7group:rwx = 4 + 2 +1 = 7others:---= 0 + 0 + 0 = 0 The corresponding permission is 770
chmod 770 test.log# recursively modifies subdirectories chmod-r 770 test
For example: [-rw-r--r--] corresponds to 644. chmod 754 file permission is [-rwxr-xr--]
3. Modify permissions based on symbol type
User, group, others are represented by u, G, O, and a for all. + Add-subtract = set
chmod u=rwx,go=rx test.log# Rights [-rwxr-xr-x]
Increase execution permissions
chmod a+w test.log# Rights [-RWXRWXRWX]
Remove Execute Permissions
chmod a-x test.log# Rights [-rw-rw-rw-]
Address: http://blog.csdn.net/yonggang7/article/details/29379595