The Linux system additional permissions mentioned here refer to SET bit permissions and sticky bit permissions. So how do you use these two permissions? This article will introduce you to the use of additional permissions in the Linux system.
SET bit permissions: used to executable program or script file set, which represents an increase SUID bit SET user rights to the owner, SGID SET bit indicates an increase in the rights of a group of users. After the execution file is set with the SUID and SGID permissions, any user who executes the file will obtain the identity corresponding to the file owner and group account.
Adding SET bit permissions to the executable file can also be implemented by the chmod command. The permission modes of u+s and g+s are used to set the SUID and SGID permissions respectively. If digital form is used, SUID corresponds to octal number 4, SGID is 2 for octal number, and can be used in privilege mode, such as "ldl"; , SGID permissions.
Sticky Bit Permissions: It is mainly used to set special additional permissions for the directory. When the directory is set with sticky bit permissions, even if the user has write permission to the directory, the other contents in the directory cannot be deleted. User's file data. A directory with sticky bit permissions is set. When ls is used to view its properties, the x at other user permissions will become t.
When using the chmod command to set directory permissions, the +t, -t permission modes can be used to add and remove sticky bit permissions. Adding and removing sticky bit permissions can also be done by changing the first digit in the numeric permission mode nnnn to 1, 0.
Privilege: 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< Br>
[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
Linux How the system uses additional permissions to introduce you here ,I hope to be helpful.
Linux users found 553 Could not create file error when using vsftp. In the face of
Docker is an open source application container engine. It is very necessary to upgr
texmaker is an editing tool with a latex editing environment, and after installing texlive, how to i
Linux Container container is a kernel virtualization technology, referred to as LXC, is a lightweigh
The implementation principle of Linux system TSO
How to switch to fcitx input method in Ubuntu Sublime Text 2
What should I do if there is garbled code on the Firefox browser page under Linux?
Linux installation g77 compiler skills
CentOS system installation using Subversion method
Linux replacement hard disk has been mounted directory skills
How Linux Systems Monitor Mogilefs Storage Nodes
How to install Linux using the pidstat command
Win8 system recovery function can restore the system easily in a few times (3)
The method of judging U disk poisoning
WinXP system explanation: decrypt scf parameters
How to set win10 input method?
How does Win7 add a password to the hard disk?
Xp system to win7 system conversion book
You have to know the Office nine application skills
How to download and install win10 windows10 installation tutorial
How to delete the Thumbs.db file in the computer in batches in Win7 system?