Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.5: How to set NSUmask in Leopard' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: How to set NSUmask in Leopard
Authored by: ikioi on Dec 22, '07 06:42:43PM

"On the Mac, the default group for new files in a directory is equal to the group of the directory -- not the group of the user. I guess Linux goofed on this -- this is a long standing Unix tradition."

This peculiar behavior does seem to occur in Mac OS X 10.5, but I've never seen Solaris, AIX, HP-UX, or BSD do this without gid bit set on a directory, and I've worked with AIX and HP-UX for a while and Solaris and BSD for years and years. I don't think the Linux behavior is a "goof" at all. I think the way Linux acts is utterly standard behavior (the same as all Unices other than Mac OS X), and Mac OS X's behavior is the odd one. There are other non-Unixy things that Mac OS X does with the filesystem. For instance, some files on the HFS+ filesystem might not have a gid at all stored on disk (because HFS+ is inherited from Mac OS 9). When OS X has to present those files to users, it has to make up a gid for them on the fly. So, some files on HFS+ under Mac OS X actually have a different GID depending on which user is accessing the file. Odd behavior in HFS+ was necessary to allow Unix and Mac OS 9 to coexist. Another bizarrness of HFS+ under Mac OS X (10.5 only) is that it allows hard links to directories. They cannot be created using the ln command, but they are allowed on disk. This is an optimization that drastically improves the speed of Time Machine backups and backup thinning.




[ Reply to This | # ]