My (limited) understanding of basic Unix is that any files that are created will be created based on the permissions of the creating user. In particular, the group assigned will be the creating user's "default" group. But on OS X (10.8.2) I see different behavior.
Even though my default group is my user account (my GID as listed by
id), if I create a file in a directory with
drwx---r-x MyName MyName
drwx------ MyName MyName
-rw-r--r-- MyName MyName
while if I create a file in a director with
drwxr-xr-x MyName staff
-rw-r--r-- MyName staff
There are no extended attributes on any of the these directories, yet they behave as if something like
file_inherit are set, and as if read permission should always be given.
Where are these default policies set in OS X (Mountain Lion)? How can they be configured?
I'm happy with the inheritance of group, but would ideally like files created in
-r directories to be
-r also; and would like "others" to never have any access. I suspect I can do something with
umask to get this latter behavior, but I'd still like to be sure and to know where why the group is inherited from the containing directory.