SUID ,SGID ,Sticky

Original link: http://www.cnblogs.com/mjorcen/p/4099282.html

SOUTH

passwd:s

SOUTH:

  When you run a program, the owner of the corresponding process is the owner of the program file itself, rather than the initiator;

  chmod u+s FILE
  chmod u-s FILE

If FILE itself has always had execute permissions, the SUID is displayed as s; otherwise display S;

Such as:

 

chmod u+s /bin/cat 

 

You will be able to view any files

 


SGID:

  When you run a program, is a set of corresponding process is the program file itself is a group, rather than a basic set of starter belongs;

chmod g+s FILE
chmod g-s FILE
develop team, hadoop, hbase, hive
/tmp/project/
develop

 

Sticky:

  In a public directory, each of which can create files, delete your files, but you can not delete other people's files;

chmod o+t DIR
chmod o-t DIR

ex:

000 : Nothing
 001 : Sticky
...
110 : SOUTH, SGID 
 111 : SOUTH, SGID, Sticky

chmod 5755 /backup/test

umask 0022
umask 

 

Reproduced in: https: //www.cnblogs.com/mjorcen/p/4099282.html

Guess you like

Origin blog.csdn.net/weixin_30252155/article/details/94784814