File Permission management, File Permission
1. Three basic Permissions
R read permission W write permission X execution permission
2. Permission to view files and directories
Ls-l file name, display information including: file type (d directory,-common file, l link file), File Permission, file owner, file owner group, file Size, file creation time, file name
-Rw-r -- 1 itcast users 2254 tt.htm
From the second character, rw indicates that the user itcast has the read and write permissions and has no operation permissions. The subsequent r indicates that the user group users has only the read permission and has no operation permission, the final r indicates that other people (others) have only the read permission and have no write and operation permission.
3. Change Operation Permissions
Chmod [user in the group to which u belongs to the main g o all user a of other users] [+ add permissions-delete permissions = delete original permissions] [rwx] file or directory name
-Perform the same permission operation on subdirectories under R
You can also use numbers to indicate permissions, such as chmod 777 file.
R 4 w 2x1
If you want the rwx attribute, 4 + 2 + 1 = 7;
If the rw-attribute is required, 4 + 2 = 6;
If the r-x attribute is required, 4 + 1 = 5;