Linux file permissions

Source: Internet
Author: User
Tags bit set
Linux file permissions related issues I feel that the linux Foundation is not solid, so I want to read "laruence's Linux private house Dish" (do not despise me ...) Read the file permission chapter, chmod, and found a problem: it seems that no, chmod + r and chmod + x are equivalent to chmoda + r and... linux file permissions related issues I feel that the linux Foundation is not solid, so I want to read "laruence's Linux private house Dish" (do not despise me ...) Read the file permission chapter, chmod, and found a problem:

As you can see, chmod + r and chmod + x are equivalent to chmod a + r and chmod a + x, while chmod + w is equivalent to chmod u + w, the "-" operation is similar to www.2cto.com. is it special for Mao's "w? Man: A combination of the letters ugoa controls which users 'access to the file will be changed: the user who owns it (u ), other users in the file's group (g), other users not in the file's group (o), or all users (). if none of these are given, the effect is as if a were given, but bits that are set in the umask are not affected. the default value is a, but the bit set in umask is not affected. let's see what umask is:

Sure enough, the w permissions of group and other are set in umask. then, let's test and confirm:

Well, as expected, umask is 0044, and the r permissions of group and other are set. this time, we naturally replace it with "r" to make a special conclusion for www.2cto.com: 1. chmod: when ugoa is not explicitly specified, the default value is a, but the bit set in umask is not affected. 2. if you encounter a problem that you don't understand, first brainstorm (I don't seem to have this step... I'm ashamed. I can't figure it out and try again (I 'd better not try Baidu Google first). I really don't know Baidu Google. if I can't do it again, ask the heroes. The search engine is very useful, and there is a lot of information on the network, but the process of active thinking is still indispensable. If you don't want to come up with baidu or google, even if the problem is solved, it is better to solve it through your own thinking and querying the original information. Author wallenwang
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.