Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

or with

drwx------   MyName   MyName

it has

-rw-r--r--   MyName   MyName

while if I create a file in a director with

drwxr-xr-x   MyName   staff

it has

-rw-r--r--   MyName   staff 

There are no extended attributes on any of the these directories, yet they behave as if something like directory_inherit and 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.

share|improve this question
add comment

1 Answer 1

I've no answer for this, but have noticed the same issue at: http://bugs.gnu.org/14024#41

I would love to know what is setting the group to that of the containing directory.

share|improve this answer
3  
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. –  slm Apr 13 '13 at 23:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.