HP3000-L Archives

August 2003, Week 5

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Steve Cooper <[log in to unmask]>
Reply To:
Steve Cooper <[log in to unmask]>
Date:
Fri, 29 Aug 2003 11:47:41 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (33 lines)
 On Fri, 29 Aug 2003 08:42:58 -0500, Mark Landin
<[log in to unmask]> wrote:
>
>Besides taking away the user's write permissions (whether by using
>chmod or ACL's), you can't. In fact, you can't even prevent them from
>deleting the file even when someone else has it open. If the user can
>write to the file, he can delete it.

This is not correct, and is in fact a common misconception in UNIX that
leads to confusion.  In order to create or delete a file in a directory,
one needs WRITE access to the DIRECTORY, not the file.  So, one can
have no access to a file at all and still delete it, if he has WRITE
access to the directory.  Similarly, one can have full
read/write/execute access to a file, but not be able to delete it.
Sure, he can erase the contents, but to get it out of the directory, he
must have write access to the directory.

Files really have no names at all; they have numbers, referred to as
I-Nodes.  When you give a file a name, you are really creating a link in
a directory that points to that I-Node.  Files usually have one link,
but they can have several or none at all.  That's why someone can have
the file open, and someone else can then come along and remove the link
to the file, yet the original person can run just fine.  When the
operating system closes a file, if the link count is zero, it returns
the space to the free list.

Hope this takes some of the magic out of it.

Steve

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2