File Write Permission Rules

Casper H.S. Dik dik at uva.UUCP
Sat Feb 11 07:36:04 AEST 1989


In article <1995 at lindy.Stanford.EDU> eirik at lurch.Stanford.EDU (Eirik Fuller) writes:
>All this chatter about how somone else can remove my file even if I'm
>the only one who can write to it got me thinking, and the solution is
>obvious.  ....


If you have 4.3BSD, SunOS 4.x etc the solution is even more obvious:
Set the sticky bit on your directory. This prevents people other than
the owner of the file or the owner of the directory in which the link
resides to unlink or rename the link.

E.g.: 'chmod +t' /tmp prevents nasty people from doing 'chdir /tmp ; rm -f *'

--cd
----------------------------------------------------------------------------
Casper H.S. Dik
University of Amsterdam     |		      dik at uva.uucp
The Netherlands             |                 ...!uunet!mcvax!uva!dik



More information about the Comp.unix.questions mailing list