Re: [SLUG] confused about file permissions

From: Paul M Foster (paulf@quillandmouse.com)
Date: Sat Oct 29 2005 - 01:35:01 EDT


On Sat, Oct 29, 2005 at 12:38:34AM -0400, Eben King wrote:

> On Fri, 28 Oct 2005, Sick Twist wrote:
>
> > Having used Linux for some time, I thought I had a clear understanding of
> > how file permissions work. However, I have no idea why I am able to
> delete a
> > file owned by someone else for which I do not have write permission:
>
> Whether you can delete a file depends on having write permission in its
> directory, not on the permissions of the file itself. If you want to
> truncate it and keep everything else -- inode, permissions, etc. -- the same
> (e.g. "cat /dev/null > file"), you need to have write permission on the
> file.

Oh now you've gone and messed everything up. I had this all worked out,
too, and now you've wrecked my understanding. ;-}

If the permissions on the file itself don't have anything to do with
whether one can write to or delete the file in a given directory, then
what are they for? Can you show a scenario where the permissions on the
original file do make a difference?

Paul
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:55:24 EDT