Re: buglet in ext2 sticky bit?

Mike A. Harris (mharris@meteng.on.ca)
Sun, 24 Oct 1999 20:22:20 -0400 (EDT)


On Sun, 24 Oct 1999, Frank van Maarseveen wrote:

>On 2.2.13pre9 a user cannot delete a file in /tmp even if it
>is writable for everyone:
>
>japetus /tmp ls -ld . aap
>drwxrwxrwt 5 root root 1024 Oct 24 22:17 .
>-rw-rw-rw- 1 root root 30 Oct 24 22:11 aap
>japetus /tmp rm -f aap
>rm: cannot unlink `aap': Operation not permitted
>japetus /tmp id
>uid=363(fvm) gid=215(sec) groups=215(sec),3972(owner),9998(inet1),9999(inet2),9997(inet3)
>japetus /tmp uname -a
>Linux japetus.localdomain 2.2.13pre9 #1 Sat Sep 18 21:32:21 MEST 1999 i486 unknown
>
>
>AFAIK a file writable for everyone should be deletable when
>+t on the parent dir.

It is determined by the permissions on the DIRECTORY, not the
file, wether it can be deleted or not, and I believe the sticky
bit also affects this too when put on dirs.

--
Mike A. Harris                                     Linux advocate     
Computer Consultant                                  GNU advocate  
Capslock Consulting                          Open Source advocate

Join the FreeMWare project - the goal to produce a FREE program in which you can run Windows 95/98/NT, and other operating systems.

http://www.freemware.org

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/