Linux permission management

Source: Internet
Author: User
Default permission: each terminal has an umask attribute to determine the default permission for creating new files and folders. umask is represented by a number. for example, the default permission for the 022 directory is: the default permission for the 777-umask file is: 666-umask. Generally, the default umask for common users is 002, and the default permission for ro is: each terminal has an umask attribute, to determine the default permissions for new files and folders. umask is expressed as a digital permission. for example, the default permission for the 022 directory is 777-umask: 666-umask: the default umask for common users is 002, and the default umask for root users is 022. for common users, the permission for creating a file is 666-022 = 644, the permission for creating a directory is 777-002 = 755. the umask command can be used to view the set umask value. The actual umask value of umask is four bits, but the first is used to store special permissions, therefore, special permissions are not considered for the time being: suid: the sgid of the user that executes the file rather than the file to which the file belongs: execute sticky as the file group:
Permission Impact on files Impact on directories
Suid The user that executes the file as the owner of the file, not the execution file. None
Sgid Run as a file Group The group of any new files created in this directory is the same as that of this directory.
Sticky None Users with write permission on directories can only delete files they own, but cannot delete files owned by other users.
Set special permissions: set suid: chmod u + s linuxcast.net set sgid: chmod g + s linuxcast.net set sticky: chmod o + t linuxcast.net with the same general permissions, special permissions can also be represented by numbers such as suid = 4, sgid = 2, and sticky = 1. Therefore, you can run the following command to set chmod 4755 linuxcast.net:
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.