FTP Permission Settings Umask understanding

Source: Internet
Author: User
Tags file permissions

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.