7.Linux Permission Extensions

Source: Internet
Author: User

7.Linux permission Extensions

· default permissions, Each terminal uses a umask property to determine the default permissions for the new file directory.

· umask The default permission for a directory is to use the Digital permission method, 777-umask , the default permissions for the file are, 666-umask ,

• In general, the default umask for ordinary users is 002, andtheroot user's default Umsk is 022 ,

• That is, for normal users, the new file is 666-002=664, and the new directory permission is 777-002=775,

• View umask values,umask or umask-s,

• Set umask values, such as:umask 002

• Special Privileges , in addition to normal permissions, there are three special permissions:

• Only executable binaries can be set suid,sgid,sgid can also be used for directories,

· suid , the settings are allowed to execute as the file's owning user, not the current user, without affecting the directory, such as passwd ,

· Sgid , executed as the owning group of the file, and the new file created in the directory inherits the group to which the directory belongs, as Locate ,

· Sticky , users with write access to the directory can delete only the files they own and cannot delete files owned by other users .

• Set suid,chmod u+s test, user must have execute x permission on file , use cautiously, s is an error,s is correct,

• Set sgid,chmod g+s test,

• Set sticky,chmod o+t test,

• As with normal permissions, special permissions can also be represented by digital means,suid=4,sgid=2,sticky=1,

• So you can order such as:chmod 4755 test,


7.Linux Permission Extensions

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.