A detailed explanation of the usage of umask permissions in Linux systems

Source: Internet
Author: User

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!

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.