Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!snorkelwacker!think!kulla!barmar From: barmar@kulla (Barry Margolin) Newsgroups: comp.unix.wizards Subject: Re: BSD file system Message-ID: <31010@news.Think.COM> Date: 20 Oct 89 21:10:28 GMT References: <1344@accuvax.nwu.edu> <20258@mimsy.umd.edu> <38688@wlbr.IMSD.CONTEL.COM> Sender: news@Think.COM Distribution: na Organization: Thinking Machines Corporation, Cambridge MA, USA Lines: 32 In article <38688@wlbr.IMSD.CONTEL.COM> sms@WLV.IMSD.CONTEL.COM.UUCP (Steven M. Schultz) writes: >In article <20258@mimsy.umd.edu> chris@mimsy.umd.edu (Chris Torek) writes: >>Given that `the process' may be in up to 8 (4.2BSD) or 16 (4.3BSD) >>groups simultaneously, there is no single correct choice based on >>the process alone, hence the parent directory rule. > It makes sense to me to use the primary > group for purposes of file ownership. Directories such as /tmp > typically are owned by groups of which users are not members, this > has led to surprises at least once for me. This is presumably why SunOS (and other BSD systems?) supports BOTH types of default group ownership. There's a bit in the directory mode that specifies whether file groups should come from the directory or from the process. /tmp is a good example of a directory whose files should inherit the group from the process (although in most cases /tmp files should probably have null group and world access anyway). But a directory shared by a group of users might want the files to be owned by the group, even though that isn't their primary group. For example, at our site, all regular employees are in primary group "staff", but there are directories whose files should only be writable by users in particular groups. At least the way we use the system, /tmp-style group ownership seems to be in the minority. Spool directories are the only other cases I can think of offhand. There are few other places where users create files in directories owned by groups to which they don't belong (directories tend not to be world-writable -- in fact, were there no other bit available, the world-write bit could have been used as a kludgey way to implement the aforementioned flag). Barry Margolin, Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar