Unlinking objects in a directory with sticky bit set

YONETANI Tomokazu qhwt+dfly at les.ath.cx
Fri May 1 22:22:18 PDT 2009


Hi.
On HAMMER filesystem, you can remove an object you do not own even
when the directory containing it has sticky bit set:

$ su
# mkdir -m1777 test
# touch test/FOO
# ls -al test
total 0
drwxrwxrwt  1 root  wheel  0 May  2 14:17 .
drwxrwxrwt  1 root  wheel  0 May  2 14:16 ..
-rw-r--r--  1 root  wheel  0 May  2 14:17 FOO
# exit
$ rm -f test/FOO
$ ls -al test
total 0
drwxrwxrwt  1 root  wheel  0 May  2 14:18 .
drwxrwxrwt  1 root  wheel  0 May  2 14:16 ..

This is not the case on an UFS filesystem.





More information about the Bugs mailing list