Prerequisites:
Mode permission set string, format: [Ugoa ...] [[+-=][RWXX] ...] [,...]
where u represents the owner (user), g means that the owner belongs to the same group (group), O denotes other persons (other), and a shows all three;
+ means to increase the permissions,-the cancellation permission, = The unique set of permissions;
R: Indicates readable, w indicates writable, and X indicates executable.
syntax: chmod ABC file
Where A,b,c is a number, a means that user,b represents Group,c's permission to represent other.
R=4,w=2,x=1
To rwx (readable, writable, executable) properties, 4+2+1=7
To rw-(readable, writable, non-executable) properties, 4+2=6
To R-w (readable, non-writable, executable) properties, 4+1=5
Example:
chmod a=rwx file and chmod 777 file effect are the same
chmod ug=rwx,o=x file and chmod 771 file effect are the same
Use chmod 4755 filename to give the program root privileges
Chmod method of using numbers to represent permissions