From owner-freebsd-questions Mon Mar 22 13:21:26 1999 Delivered-To: freebsd-questions@freebsd.org Received: from cc942873-a.ewndsr1.nj.home.com (cc942873-a.ewndsr1.nj.home.com [24.2.89.207]) by hub.freebsd.org (Postfix) with ESMTP id 48D13152A0 for ; Mon, 22 Mar 1999 13:21:14 -0800 (PST) (envelope-from cjc@cc942873-a.ewndsr1.nj.home.com) Received: (from cjc@localhost) by cc942873-a.ewndsr1.nj.home.com (8.9.3/8.8.8) id QAA08508; Mon, 22 Mar 1999 16:20:51 -0500 (EST) (envelope-from cjc) From: "Crist J. Clark" Message-Id: <199903222120.QAA08508@cc942873-a.ewndsr1.nj.home.com> Subject: Re: Changing groups In-Reply-To: <6C37EE640B78D2118D2F00A0C90FCB441A5FB3@site2s1> from Christopher Michaels at "Mar 22, 99 04:03:23 pm" To: ChrisMic@clientlogic.com (Christopher Michaels) Date: Mon, 22 Mar 1999 16:20:51 -0500 (EST) Cc: jonc@pinnacle.co.nz, freebsd-questions@FreeBSD.ORG Reply-To: cjclark@home.com X-Mailer: ELM [version 2.4ME+ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG fChristopher Michaels wrote, > > From: Jonathan Chen [SMTP:jonc@pinnacle.co.nz] > > On Mon, 22 Mar 1999, Christopher Michaels wrote: > > > > > Are we talking to permanently change the default GID of new files, or > > are we > > > talking on a per file basis? > > > - To permanently change the default group needed, you would have to > > edit > > > the password file and change that users group (vipw). > > > - To change the group ownership of specific files, just use one of the > > > following. > > > chgrp > > > chown : > > > > > > > Actually, under the BSD file creation semantics; any new file created > > in a directory will get the directory's group-id by default. So all > > you need to do is to create the directory with the correct group-id > > required. > > I did notice something to the effect but I wasn't sure.. my questions is.. > does this apply even if the user isn't a member of that group? > -Chris [107:/tmp] ls -ld . drwxrwxrwt 5 bin bin 1024 Mar 22 16:30 . [108:/tmp] id uid=2045(cjc) gid=20(staff) groups=20(staff), 0(wheel) [109:/tmp] touch foo [110:/tmp] ls -ld foo . drwxrwxrwt 5 bin bin 1024 Mar 22 16:30 . -rw-rw-r-- 1 cjc bin 0 Mar 22 16:30 foo Yes. -- Crist J. Clark cjclark@home.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message