Re: [SLUG] confused about file permissions

From: Paul M Foster (paulf@quillandmouse.com)
Date: Sat Oct 29 2005 - 18:53:08 EDT


On Sat, Oct 29, 2005 at 05:58:08PM -0400, Ian C. Blenke wrote:

> Eben King wrote:
> >On Sat, 29 Oct 2005, Paul M Foster wrote:
> >
> >>On Sat, Oct 29, 2005 at 12:38:34AM -0400, Eben King wrote:
> >>
> >>>On Fri, 28 Oct 2005, Sick Twist wrote:
> >>>

<snipation>

Excellent exposition, but it begs the question. Obviously, when you
delete or write to a file in a directory, you're doing two things:
affecting the file itself, and the directory in which it's written
(which in itself is a glorified file). Given:

drwxr-xr-x paulf paulf /home/paulf
-rwx------ bob bob /home/paulf/bobsfile

it makes sense to me that, as paulf, I'd need rwx permissions in the
directory to delete or write to bobsfile. However, it doesn't make sense
that I could delete bobsfile. The permissions on the directory would
allow it, but the permissions on bobsfile should deny it. I would have
assumed that the logic would be:

if (permissions in directory allows deletion by user x)
        if (permissions on file allow deletion by user x)
                operation allowed;
        else
                operation not allowed;
else
        operation not allowed;

But that appears to not be the case. It would appear from the logic in
this thread that the actual file permissions (and ownership) are simply
ignored. But then the question becomes: why have individual file
permissions at all (on regular files)?

So if the above isn't the logic, what is?

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:57:14 EDT