Turn http://bbs.chinaunix.net/thread-669631-1-1.html
umask=022 "022" is the octal system, if replaced by the binary is 000010010
In Unix, file permissions are three categories of users, with three of permissions. The three categories of users are file owner user (U), the Owner Group Group (g), other users Others (O), and three permissions are read (r), write writes (W), execute execute (x).
If the permissions of a file are as follows: The owner has read and write permission, the group has reading and execute permissions, other users have Read permission, can be written as:
rw-r-xr--
The first three digits indicate the owner's permissions, the middle three-bit indicates the group permissions, and the last three digits indicate the permissions of the other user. We can see the file permission details with Ls-l, the list is 10 bits, the first digit if the D is a subdirectory.
Say, if you change the top 9 letters to binary numbers:
110101100
If you change to octal is how much.
Therefore, file permissions can be expressed in 9-bit binary numbers. Umask in English is the meaning of shielding, then
umask=022
Refers to the screen file 022 permissions, in the end shielding what. Use this octal number in binary notation
000010010
Conversion into letters is
----w--w-
The Write permission to cancel the group, and to cancel other users ' write permissions.
What permissions are left after you mask these permissions? To indicate by letter is:
Rwxr-xr-x
In binary notation is:
111101101
You can compare
000010010
You can know the conversion relationship before and after shielding.
In the VSFTPD configuration file, umask=022 represents the right to be masked after the file is blocked, and the other is to say that the uploaded file has permissions.
You can read a little bit about the UNIX operating system and write it much better than I do.