Search CTRL + K

Sticky Bit

黏滞位(sticky bit) 作用于目录,效果是该目录下的文件只能被所有者、root 删除。

/tmp 目录为例:

❯ ls -al / | grep tmp
drwxrwxrwt    - root 11 Mar 19:03 tmp

有两个方法设置 黏滞位

other + t (sticky)

The last special permission has been dubbed the "sticky bit." This permission does not affect individual files. However, at the directory level, it restricts file deletion. Only the owner (and root) of a file can remove the file within that directory.[1]

  1. ↩︎