[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: user can delete kernel images (cont)



manoj wrote:

> 	Safe or not, it is UNIX ;-). Deleting a file is not actually
>  modifying the file, you are really modifying the directory the files
>  reside in. So, if you have write permissions to a directory, you may
>  delete any other file that is in there, as you observed. This can't
>  really be changed (this is the way things have behaved since the
>  beginning of the epoch).

This can actually be changed readily: if you set the sticky bit on the
directory (chmod +t <dir>), then only the file owner (and root) can
remove a file in it, regardless of the fact that others may have write
permission as well.  This is used for scratch directories like /tmp.

Eric

-- 
 E.L. Meijer (tgakem@chem.tue.nl)          | tel. office +31 40 2472189
 Eindhoven Univ. of Technology             | tel. lab.   +31 40 2475032
 Lab. for Catalysis and Inorg. Chem. (TAK) | tel. fax    +31 40 2455054


--  
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: