Better explanation of UMASK
The octal level for Linux starts at 666. The magic numbers to remember are-
4 2 1
r w x
4+2+1 = 7 = rwx
4+0+1 = 5 = r-x
hence
4+2+0 = 6 = rw-
If you have a file with -rwx rwx rwx then you must have the octals 777 to match.
If your file is -rwx r-x r-x then the octals that match are 755
Now that we understand that we look at umask.
We start with a base figure of
666
-022
644 = rw- r-- r--
You will see your default umask level or setting in the /etc/profile file ... most of the time.
Some sysadmins will alter it to something stricter to help ensure more privacy between users ie 066 or 026
kjteoh
4 2 1
r w x
4+2+1 = 7 = rwx
4+0+1 = 5 = r-x
hence
4+2+0 = 6 = rw-
If you have a file with -rwx rwx rwx then you must have the octals 777 to match.
If your file is -rwx r-x r-x then the octals that match are 755
Now that we understand that we look at umask.
We start with a base figure of
666
-022
644 = rw- r-- r--
You will see your default umask level or setting in the /etc/profile file ... most of the time.
Some sysadmins will alter it to something stricter to help ensure more privacy between users ie 066 or 026
kjteoh


0 Comments:
Postar um comentário
<< Home