There are two levels of rights management
First Tier User: File Owner (u), group user (g), Other (O)
Second layer differentiated permissions: Read (r), write (W), executable (x)
These two levels constitute a two-dimensional structure for file rights management
U g o
R
W
X
In practice, we use 9 bit bits to represent the values of the nine positions in this table, respectively.
It's three digits in octal.
So the most common to chmod 777 filename
The meaning of 777 is to put all nine of the above lattice 1: All users have read/write/execute permissions
There are three more unpopular modes: S_isuid s_isgid, sticky (sticky) bit
The top two allows the user to have the file owner's permission when the file is executed, and the last to make the file as permanent as possible (it makes little sense under the virtual Storage Management framework)
chmod command:
chmod u+x filename
where the first u, representing the user of the operation, is currently in the modification of WHO's access rights: U (file owner), O (Other), G (Group user) or a (all the users)
The second is the operator: + (add specific permissions),-(remove specific permissions), = (Assign to specific permissions)
The third is permission: R, W or x, which can be combined.
File Rights Management under Linux