The Umask value is used to set the user's default permissions when creating a file, and when we create a directory or file in the system, the default permissions for the directory or file are determined by the Umask value.For the root user, the
The Umask value is used to set the user's default permissions when creating a file, and when we create a directory or file in the system, the default permissions for the directory or file are determined by the Umask value.For the root user, the
Default Permissions: umask, file system, special permissions, and umaskChapter 4 permission errors 1st common user ls/root/
/Root is a common root user and does not have any permissions, so it cannot be viewed.
[Oldboy @ znix ~] $ Ls/root/
Ls:
The simplest way to calculate umask values and file directory permissionsPermissions for directories created by default in Linux are 755[Email protected] data]# mkdir a[email protected] data]# LLTotal 4Drwxr-xr-x. 2 root root 4096 Apr 13:09
The system defaults to the default permissions properties of the query directly umask, you can get the following content (this will be related to the role of the currently logged-on user):
0022
How is 4 group Ah, should not be 3 groups. In fact,
When we log on to the system and create a file that always has a default permission, then how does this permission come from? That's what Umask did. Umask set the user to create the default permissions of the file, it and chmod effect just the
Umask command details, umask details
The linux system assigns default permissions to the created files and directories.
The default parameter umask is 0022.
View the created file and directory permissions.
The File Permission is rw-r --
The
The chmod command differs from the umask command to change the access permission of the file directory. It is a very heavy system command. You can use it to control access to files or directories. Umask is a default permission for creating a file or
UMASK Specifies the default permissions for the current user when creating a new file or directory, and the user can view the default permissions for the current system files and directories directly using the UMASK directive:[[email protected] ~]#
Security mechanism of the system: Umask (Filter code)
Use the Umask command to view the value of the current userFor the average user speaking umask:0002For administrators umask:0022
So when
When the administrator creates the folder, it is
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.