|
1.SET bit permissions: used to executable program or script file set, which is the main user of SUID represents an increase SET-bit permissions, SGID expressed within a group of users to increase SET-bit access. After the executable file is set SUID, SGID permissions, any user execute the file and obtain the file owner, is a group corresponding to the identity of the account.
Add SET-bit executable file permissions using the chmod command can also be achieved using the u + s, g + s permission modes are used to set the SUID, SGID permission. If you use a digital form, SUID the corresponding octal number is 4, SGID for the octal number is 2, can be "nnnn" in the form of privilege modes, such as "4755" means to set SUID permissions, "6755" means and set SUID, SGID permissions .
File data is mainly used to set special permissions for an additional directory, when the directory is set to the sticky bit permission, even if the user has write access to the directory, you can not delete the directory of other users: 2. The sticky bit permission . Setting directory permissions sticky bit, when using ls to view its properties, permissions to other users at x becomes t.
When using the chmod command to set the directory permissions, + t, -t privilege modes are used to add, remove sticky bit permission. The digital rights mode nnnn The first digit to 1,0, may also be implemented to add, remove sticky bit permission.
Privileged position: suid sgid
[Root @ ocm1 ~] # vim kuqlan.sh
[Root @ ocm1 ~] # ll
total 84
-rw-r - r-- 1 root root 17 Mar 10 12:57 kuqlan.sh
lrwxrwxrwx 1 root root 3 Mar 9 16:58 t.link -> ttt
[Root @ ocm1 ~] # chmod 755 kuqlan.sh
[Root @ ocm1 ~] # ls -al kuqlan.sh
-rwxr-xr-x 1 root root 17 Mar 10 12:57 kuqlan.sh
[Root @ ocm1 ~] # chmod 4755 kuqlan.sh
[Root @ ocm1 ~] # ls -al kuqlan.sh
-rwsr-xr-x 1 root root 17 Mar 10 12:57 kuqlan.sh
[Root @ ocm1 ~] # chmod 2755 kuqlan.sh
[Root @ ocm1 ~] # ls -al kuqlan.sh
-rwxr-sr-x 1 root root 17 Mar 10 12:57 kuqlan.sh
[Root @ ocm1 ~] # chmod 6755 kuqlan.sh
[Root @ ocm1 ~] # ls -al kuqlan.sh
-rwsr-sr-x 1 root root 17 Mar 10 12:57 kuqlan.sh |
|
|
|