Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!ames!ucbcad!ucbvax!decvax!decwrl!sun!gorodish!guy From: guy@gorodish.UUCP Newsgroups: comp.unix.questions Subject: Re: Groups in 4BSD (Was: System V letting random users chown) Message-ID: <15529@sun.uucp> Date: Tue, 24-Mar-87 14:19:55 EST Article-I.D.: sun.15529 Posted: Tue Mar 24 14:19:55 1987 Date-Received: Thu, 26-Mar-87 04:31:46 EST References: <2454@mtgzy.UUCP> <2940005@hpisod2.HP.COM> <2242@ptsfa.UUCP> Sender: news@sun.uucp Reply-To: guy@sun.UUCP (Guy Harris) Organization: Sun Microsystems, Mountain View Lines: 21 >>Nothing is wrong with it until you decide that you want to access files >>belonging to two different groups in the same process. BSD has a list >>of groups for each process. > >/etc/group in SysV does the same thing. No, it doesn't. "/etc/group" in systems that haven't picked up the 4.2BSD "group set" notion merely indicates which people can "newgrp" to a particular group. A process can only have one group that it belongs to. If you want to access a file that's only accessible to members of a particular group, and you're not currently running with that as your group ID, you have to "newgrp" to that group. In systems that have picked up the 4.2BSD "group set" notion, "login" adds the first N (for some value of N, ~8 on 4.2BSD, ~16 on 4.3BSD) groups that a user is listed as a member of to the "group set" for that user's login shell process. (It uses "/etc/group" for this, of course; the file has the same format that it does in other UNIX systems.) That process, and its descendants (unless they change their effective group ID or group set), can access files accessible to any of those groups.