There are too many details about Linux permissions on the Web, not to be verbose here. The main explanation is that these permissions are miscellaneous, otherwise know what users, groups and other permissions are not good enough.
I. Classification of rights
R: Read permission, the number code is "4".
W: Write permission, the number code is "2".
X: Execute or toggle permissions, the number code is "1".
-: No permission, number code is "0".
Each segment in Linux is a value of r+w+x, Max 777, see
Ii. when the permission is used
Directory Write permission: You can delete all contents in the directory, change the file and directory name.
Directory Read permission: Can ls this directory.
Directory execution: You can enter subdirectories of the directory.
File Write permission: Can change the contents of the file
File Read permission: Can check file
File execution rights: can execute File command
Third, user group permissions to use
The basic knowledge is not much said, self-check, only the specific effect.
Suppose Gruop is as follows:
getso:x:502:jerry,laohujerry:x:506:
Jerry was the owner of the Jerry Group and belonged to the Getso group. Laohu is not the master, only belongs to the Getso group.
Effect:
Jerry and Laohu access to Getso files with group permissions
Getso access to Jerry and Laohu files with public permissions
Laohu access to Jerry with public permissions, access to Getso with group permissions
Laohu created file belongs to Getso Group
The files created by Jerry and Getso belong to their own group.
Such a variety of places do not have access to the control of this to solve the better.
Iv. User Group changes
Usermod-g Getso Jerry makes Jerry a member of Getso.
Usermod-g Getso Jerry made Jerry a member of Getso, and Jerry was not the leader.
Gpasswd-m Jerry Getso made Jerry a member of Getso.
gpasswd-d Jerry Getso makes Jerry no longer a member of Getso.
Linux Permissions in detail, multi-user groups of various permissions configuration principle