Julia A. Case grabbed a keyboard and wrote:
>
> Quoting jipe ([EMAIL PROTECTED]):
> > directory's permissions have prior on the files permissions....
> > if root wants to put a file in /home/user that he doesn't want user to
> > modify, he has to put it in a specific dir which he is the owner.
>
> Seems a bit strange to me that the directory permissions would take
> priority over a file, it would make more sense if the directory
> permissions would dictate what files could be created in the directory
> and not allow you to remove a file that you didn't have permission on.
It's really not that strange, if you stop and think about what's actually
happening.
A directory is really nothing more than any other file. It's only
"special" in that what it contains is pointers to where other files reside
in the filesystem instead of text or whatever. When you create,
move/rename, or delete a file, what you're doing is modifying an entry in
the directory file itself, and not the file which you are
creating/editing/deleting/whatever.
If you have permissions to write to a file, you can make changes to the
contents of that file. If you have write permissions to a directory (which
is just another type of file), then you can make changes to the contents of
that directory. Editing a file changes the contents of that file.
Creating, moving/renaming, deleting a file is just editing the contents of
the directory which points to the file that you're
creating/moving/deleting, and thus is "editing" the contents of the
directory.
I hope this helps explain it a bit for you, and helps it make more sense.
--Dave
--
David Guntner GEnie: Just say NO!
http://www.akaMail.com/pgpkey/davidg or key server
for PGP Public key
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com