[Linux-disciples] Deleting files you don't own
Dylan Thurston
dpt at bostoncoop.net
Wed Nov 17 07:48:19 EST 2004
On Wed, Nov 17, 2004 at 07:37:27AM -0500, Stephen R Laniel wrote:
> I was trying just now to figure out why it is that people
> who don't own a file or even have any permissions on it are
> allowed to delete it. So I created a file, set the
> owner to root:root, set the permissions to 600, then tried
> to delete it. I was asked whether I really wanted to delete
> a write-protected file, and responded that I did want to;
> the file was deleted.
>
> Why are users allowed to do this? Where's the logic (I
> assume this happens by design)? And if it's something that
> should be overridable, how does one override it?
You can delete a file iff you have write permission on the directory
containing it. (Unless the sticky bit on the directory is set, I
think.) It's the directory that needs to be modified, not the file.
Peace,
Dylan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20041117/a16f6eca/attachment.pgp
More information about the Linux-disciples
mailing list