Linux commands: special permission bits

Source: Internet
Author: User

Special Permissions Introduction to Commands:    

SUID: when running a program, the owner of the corresponding process is the owner of the program file itself, not the initiator;

chmod u+s FILE

chmod u-s FILE

If file itself has execute permission, then SUID is displayed as S;

SGID: when running a program, the group of the corresponding process is the group of the program file itself, not the base group to which the initiator belongs;

chmod g+s FILE

chmod g-s FILE

Develop team, hadoop,hbase, Hive

/tmp/project/

Develop

If file itself has execute permission, then Sgid is displayed as s;

Sticky: in a common directory, each can create files, delete their own files, but not delete others ' files;

chmod o+t dir only for directory settings

chmod o-t dir only for directory settings

If the directory itself has execute permissions, the Sgid is displayed as s;


1 . Command format:

chmod u+s file to set SUID permissions for the main location of the files

chmod u-s file cancels the SUID permissions of the main location of the files

chmod g+s file to set suid permissions for the genus group location of files

chmod g-s file cancels the SUID permissions of the main location of the files

2 . Command function:

SUID: when running a program, the owner of the corresponding process is the owner of the program file itself, not the initiator;      

SGID: when running a program, the group of the corresponding process is the group of the program file itself, not the base group to which the initiator belongs;

Sticky: in a common directory, each can create files, delete their own files, but not delete others ' files;      


3 . Command parameters:

 /

4 . Command instance :

Special permission bits are represented by binary:

000: Indicates no special permission bit

001: Indicates special permissions with sticky

...

the : Indicates a suid SGID

111 : Indicates that three special permission bits have

chmod 5755/backup/test

Umask 0022

Umask number, set default Umask permissions


chmod u+s file sets suid permissions on files, any user has the file owner permission for the file.


This article is from the "Learn Linux history" blog, please be sure to keep this source http://woyaoxuelinux.blog.51cto.com/5663865/1865421

Linux commands: special permission bits

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.