Umask are usually given permissions when you create a directory or file initially.
Here are two points to note:
1, for the directory X permission representative can enter the directory, so that the initial assignment of this permission is no problem;
2, for the file X permission representative execution, this risk is too high, so the general permissions initial assignment must remove X;
[Root@www ~]# Umask
0022
What do these four letters represent?
First, the above four digits represent the permissions that the assignment initialization prepares to discard. (in the case of a file, x permission must be discarded if it is not stated to be discarded)
The first 0 represents Suid's discarded permissions;
The second 0 represents the file/directory owner what permissions are not discarded (if it is a file, with the exception of x permissions, why look at the above explanation);
The third 2 represents the user group for this file/directory to discard the W permission (if it is a file, then its x permissions are discarded);
The third 2 represents the permissions that other users of this file/directory can use only R and X (except files).
Combined with the above, if you create a new file, then its permissions are:-wr-w--w--: 644
If you create a new directory then its permission is: Dwrxw-xw-x is: 755
If you want to modify unask familiarity directly:
[Root@www ~]# umask 002
Get It!