Linux command--umask

Source: Internet
Author: User

    1. Command format:

      umask nnn (nnn on behalf of number 000-777)

    2. Command function:

      umask permissions complement, the role is to set the default directory or file permissions with. The default value is 022, at which point the default permissions for the directory you are building are 755 (7-0,7-2,7-2), and the file default permissions established are 644 (6-0,6-2,6-2)

    3. Common examples:

Example 1:umask # #查询当前umask权限数值


Example 2:umask 002 # #修改umask权限数值为002, modified to create directories and files with default permissions of 775 and 664


To modify the value of the umask for a long time, you can write it into/etc/profile or ~/.profile or ~/.bash_profile

Linux command--umask

Related Article

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.