In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to use Linux UMASK permissions", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let Xiaobian take you to learn "How to use Linux UMASK permissions"!
In linux, when we create a new file or directory, these new files or directories will have default access permissions. The umask command is related to default access permissions for files and directories.
Here are two things to note:
1. For a directory, x permission means that you can enter the directory, so there is no problem with the initial assignment of this permission;
2. The permission for x of the file represents execution. This risk is too high, so the initial assignment of general permissions must remove x.
[root@www ~]# umask0022
What do these four letters stand for?
First of all, the above four numbers represent the permissions assigned to initialize and discard. (For the corresponding file, the x permission must be discarded by default even if it is not specified)
The first 0 represents the permission to discard suid;
The second 0 represents that the owner of this file/directory has not discarded any permissions (if it is a file, except x permission, why see the explanation above);
The third 2 represents that the user group of this file/directory has discarded the w permission (if it is a file, then its x permission is also discarded);
The third 2 represents that the only permissions available to other users of this file/directory are r and x(except for files).
If you create a new file, its permissions are: -wr-w-w-that is: 644
If you create a new directory, its permissions are: dwrxw-xw-x, which is: 755
If you want to modify unask familiarity directly:
[root@www ~]# umask 002 At this point, I believe everyone has a deeper understanding of "how to use UMASK permissions in Linux". Let's actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.