Subject: Re: Permission denied
To: None <tech-userlevel@netbsd.org>
From: Lucio De Re <lucio@cackle.proxima.alt.za>
List: tech-userlevel
Date: 07/12/1999 16:56:48
On Mon, Jul 12, 1999 at 09:01:00AM -0400, Andrew Brown wrote:
> 
> ls -load . index.html
> 
Much the same, the "flag" is "-":

$ ls -load . index.html
-rw-rw-r--  1 itcba itcba -   0 Jul 12 14:21 index.html
drwxrwxr-x  2 itcba itcba - 512 Jul 12 14:21 .

I'd like to get to the bottom of this, if at all possible.  Any debugging
suggestions?

A few things baffle me:

$ echo fred > index.html
cannot create index.html: permission denied

... I can appreciate this, presumably this uses creat(2) or
equivalent, but...

$ echo fred >> index.html
cannot create index.html: permission denied

seems a bit inappropriate, does this mean I can only append to files in
directories where I have write permission?

I already mentioned to Hubert that I first tried the 

$ touch index.html

in an empty directory, and on a file freshly created as root, with
relevant permissions and ownership changes.  The results were identical.

I can try this trick under NetBSD 1.4, with a bit of effort.  My gut
feel is that the number of group memberships is significant, but I can
only guess.  Perhaps there's a way to dig into the kernel?  I'm perfectly
comfortable in "C", but kernel hacking is something I only do under
duress.