On Tue, Aug 16, 2011, Stefan Johnson wrote:

> On most of the unix / unix-like systems I support, this behavior would be
> different.  The file would be created with user_a:group_a (since group_a is
> the primary group.)  This is true on AIX, Solaris, Linux, and HP-UX per my
> testing earlier today.  On Tru64 and OpenBSD, the group ownership seems
> to be inherited by the parent directory rather than set by the user's
> primary group
> membership.  For AIX et.al. the "setgid" bit on the parent directory would
> change
> the behavior such that files created inside that directory would be owned by
> the
> parent directory group owner regardless of user's primary group membership.
> 
> It appears that OpenBSD (and Tru64) treat the directory as setgid (when
> compared to the other OSes) but it is not.

BSD derived systems always have the setgid directory behavior.

The rationale is that if you have users sharing a directory, this is the
behavior you want and you shouldn't need to remember to chmod every
directory created, especially since you may not be creating directories
by hand.

Reply via email to