1. defaut authority
1. each terminal has a umask value
2. umask value decides the authority of files and directories
1. dir 777-mask
2. file 666-mask
3. umask check and set the value of umask value
4. normal user umask = 002 and root =022
2. specify authority
1. total 12bits authority
2. suid
1. when execute the file, enable the executing by the owner instead of the invoker.
2. change the x to s.
3. sgid
1. executing by the group ID.
2. if a dir has this sgid, when create new file, the group of the file will set to the directory by defaut.
4. sticky
1. if has the write of a dir, when sticky is set different usr can only delete their owner file under this dir.
SUID 4
SGID 2
STICKY 1
转载于:https://my.oschina.net/incarnation/blog/98239