1. Character notation
Type operation permissions
U +r
G -W
o =x
A
The type represents the object that modifies the permission, U represents the user of the file, G represents the group of the file owner, O represents a non-user group user, and a represents Ugo
Action + represents an increase in permissions,-Indicates reduced permissions, = indicates permissions granted
The permission R is read-only, W is writable, and X indicates an executable
[[Email protected] ~] # mkdir Perm
[[Email protected] ~] # CD Perm
[[email protected] perm] # mkdir Test
[[email protected] PERM] # CD Test
[[email protected] test] # touch Test1
[[email protected] test] # touch Test2
Here are the test commands, see
chmod u-w Test
chmod g+w Test
chmod ug+w Test
chmod ugo-x Test
chmod a+x Test
chmod o=w Test
chmod a= Perm
Chmod-r a+rwx Perm
2, digital notation
Permission numbers
R4
W2
X1
-0
For example, rwx numeric representation is 4+2+1=7, which is actually a binary representation, rwx three-bit bit,111, or 7
Example:
chmod 577 Test
chmod 555 Test
Chmod-r 754 test//-r parameter means recursion
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Ways to set Linux file and directory permissions