Permissions for Renaming a File vs Directory

Hello,

I'm trying to fully understand UNIX permissions as applied to directories. While testing my understanding today, I came across something I found peculiar.

Please consider the following directory structure:

mydir (bob/bob: 0700)
+myfile (root/root: 0700)
+mysubdir (root/root: 0700)

As expected, user bob can rename 'myfile' because he has w+x permission for 'mydir'. On the other hand though, only root can rename 'mysubdir', which isn't what I expected.

Could someone shed some light on why the name of 'myfile' is subject to the permissions of 'mydir', whereas the name of 'mysubdir' is subject to the permissions of itself? Also, could you perhaps point me somewhere that explains UNIX permissions in-depth? (I have four thick UNIX books, and I couldn't find this explained in any of them.)

Thanks very much!

Dave

Just tested this out of curiosity on my Debian Linux box and it works even for the directory. Same on AIX 5.3. Maybe it is special on your type of Unix derivative or Linux distribution.
Maybe tell us your OS type so some user with access to the same can confirm this.

Ah - that could explain part of it; I'm on Mac OS X (10.5).

Now that know that it may be an OS X-specific behavior, I'll see if I can find any more information about it. I'll post back if I find anything.

Thanks!

Dave