[CLUE-Tech] Directory permissions -- problems with "-w--w--w-"
Jed S. Baer
thag at frii.com
Sat May 25 07:33:44 MDT 2002
On Wed, 22 May 2002 13:00:38 -0400
"Joe 'Zonker' Brockmeier" <jzb at dissociatedpress.net> wrote:
> bof wrote:
>
> > But when I changed the directory permissions to -w--w--w-, I could
> > not add a new file or delete any of the existing files, getting a
>
> As I understand it, this is because a utility cannot write a file to a
> directory unless it can "see" (r) the files in the directory and the
> same goes for deleting a file. For example, rm returns an error if you
> try to remove a file that does not exist. The first thing it does
> (AFAIK) is to "look" to see if the file in fact exists before attempting
> to remove it, then checks the permissions before trying to remove it and
> finally, it will actually remove it if test 1 and test 2 have passed. If
> file does not exist, error. If file exists but you do not have
> sufficient permissions, error. It must read the file before it can
> decide this, though. I imagine that most of the other GNU utilies
> perform the same checks.
Well, I hope it isn't actually the rm program doing this. It should be
handled further down someplace in the software stack, perhaps in the IO
library for the filesystem.
jed
--
Got Privacy? http://makeashorterlink.com/?N33052F1
"Those who expect to reap the blessings of freedom must, like men,
undergo the fatigue of supporting it." - Thomas Paine
More information about the clue-tech
mailing list