Linux permission Shielding-general Linux technology-Linux technology and application information. For details, refer to the following section. In Linux, the default permissions for files and directories are 666 (read and write) and 777 (read, write, and execute ), that is, the new file owner, the same group of users, and other users have the read and write permissions. However, the final permission is the permission after the permission screen cheating. You can use umask in your Linux system to check your permission screen disadvantages. the root user's permission screen disadvantage is 0022. Note that we only need to pay attention to the 022 values, the 1st zeros are the same as those shown on the leftmost side of files and directories in linux Through ls-l. What exactly does 022 mean? The others are very simple. Here we will explain the three numbers respectively. 0 indicates that the owner's permissions remain unchanged after umask; 2 indicates that the write permission of the same group of users of the owner has been rejected by the screen. That is to say, although the owner and the group of users have the write permission by default when creating a file, the owner has no write permission for users in the same group. The last two represents the same meaning as the previous two.
It should be noted that the user's final permissions are not obtained by using the default permission minus the permission screen cheating, but by the number of permission screen cheating (022 ), the three numbers are known as 0 represents the owner (4, 2, 1); 2 represents the owner in the same group (4, 2, 1 ); 2 represents other users (4, 2, 1 ). 2 of the same group of users as shown above indicates that the write permission has been rejected by the screen. The number of the permission screen cheating code indicates which or several permissions have been displayed.
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