Changing access rights chmod
Format: chmod [Who][+1-1=][mode] FileName
Parameters: Who=u, g O, a
Mode: +-=
Rights alphanumeric combination: R-4 w-2 x-1 r-x-5 r---4--x-1
#chmod u=rwx,g=r--, o=r--123.txt
#chmod 744 123.txt
#ls-L 123.txt
-rwxr--r--1 root root 12777 December 4 20:31 123.txt
Adding or deleting a file to a permission
# chmod u-x,g+w,o--123.txt
# ls-l 123.txt
-rw-rw-r--1 root root 12777 December 4 20:31 123.txt
Chmod-r XYZ Filname
-R indicates cascading changes
Root User directory permissions default 755, file default permissions 644
UMASK Specifies the default file or directory permissions
View Umask Value input Umask Enter, default is 0022, directory permission is 755, file permission is 644
All directories under Linux must have X permissions
0022 usually only after three bits 022=----w-w-
Note: The user establishes the ordinary file does not have the X permission namely 666, the directory permission all is open namely 777
755 rwx rwx rwx-----w-w-= rwx r-x r-x
644 rw-rw-rw------w-w-= rw-r--r--
Command note chmod, umask