Sticky bits (stickybit), also known as sticky bits, are a flag for UNIX file system permissions. The most common usage is to set the sticky bit on the directory,
Can only be set for the record, for the effectiveness of the piece. After the sticky bit is set, only the owner or root of the file in the directory can delete or move
the file. If you do not set a sticky bit for the directory, any user with the write and execute permission for that directory can delete and move the files in it. Should actually
in use, sticky The stall is generally used in the/TMP directory to prevent ordinary users from deleting or moving other users ' files.
In a Linux system? The typical example is the "/tmp", "/var/tmp" record. These two recordings are temporary components of the Linux system.
Clamp, The permission is "rwxrwxrwx", that is, allow any user, any program in the record to create, delete, move the pieces or?? Recording and other operations.
Yes ? Imagine, if any of the ordinary households can delete system services What will be the result of the temporary parts of the transport?
The sticky bit permission is for this situation setting, when the record is set the sticky bit permission, even if the user has written permission to the record, nor
can delete In addition to the data of the other households in the record, is it only the owner and root of the piece that has the right to delete it? After you set the sticky bit,
just to In order to maintain a dynamic balance: Allow the user to
It is important to note that the sticky bit permission can only be set for the record, for the case.
set the record of the sticky bit permission to enable the LS command to view its properties, other user rights The "x" at the limit will change to "T".
For example, check the permissions of/tmp,/VAR/TMP, and confirm that there is a "T" tag.
The sticky bit permissions are set for other? chmod commands . when recording permissions,
"O+t", "o-t" permission mode can be added, remove the sticky bit right limit.
For example, set the sticky bit permissions for the/test record.
At this time, the ordinary household hxy law to delete/root/test/file1 pieces.
the sticky bit permission is also in the production environment, when it is necessary to provide the user with a I don't want to build it. into management chaos, by
set the sticky bit permissions for the record can solve the problem.
Use of linux-sticky bits