On Tue, Aug 16, 2011 at 11:09 PM, Ted Unangst <t...@tedunangst.com> wrote:
> 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. > Thank you both for the explanation. I thought it might be a BSD vs SysV situation, but I wasn't positive. The reasoning is sound. I appreciate the quick responses! Stefan Johnson