Linux Commands-Rights Management command: Umask

Source: Internet
Author: User

Umask-s  Display the default permissions when a user creates a directory or file

mkdir shuaige   -ld shuaige  View the current permissions of the Shuaige directory (the same as the default permissions above)

Touch-l ABCD  -l ABCD  view abcd file Right money (note and the default permissions above are not the same)

Note that one x is missing for each permission location

In a Linux system, the files created by default are not executable, so the Linux system is relatively safe.

Umask  View default created permissions, return 0022

Understand how directories or file permissions are added (logic and operations), see:

Modify the default value of 022 to 077, what is the permission after the file is created, as follows:

077  Modify the default create file or directory permission to 077

Touch MEINV   -L MEINV The  default permission to view the Meinv file is already RW-------, not the rw-r--r--of the previous ABCD file.

mkdir mingxing   -ld mingxing The  permission to view the Mingxing directory is already rwx------, not shuaige of the previous rwxr-xr-x directory.

Linux Commands-Rights Management command: Umask

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.