Sticky 冒险位或称粘制位
普通文件的 sticky 位会被 linux 内核忽略。
目录的 sticky 位表示这个目录里的文件只能被 owner 和 root 删除 。
o+t 实验:
useradd -m -s /bin/bash uos1
mkdir /tx
chmod o=rwx /tx/
touch /tx/uos1
su - uos1
rm /tx/uos1
//是可以删除的
exit
注销
chmod o+t /tx/
touch /tx/uos2
su - uos1
rm /tx/uos2
rm: 无法删除'/tx/uos1': 不允许的操作 //加上 t 权限之后就不可以删除其他人的文件
https://xpanx.com/
评论