Date: Tue, 3 Apr 2001 02:24:01 -0400 From: Paul Chvostek <paul@flarn.it.ca> To: Greg Lehey <grog@lemis.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Is there an equivalent of newgrp in FreeBSD? Message-ID: <20010403022401.S12995@flarn.it.ca> In-Reply-To: <20010403105642.B71213@wantadilla.lemis.com>; from grog@lemis.com on Tue, Apr 03, 2001 at 10:56:42AM %2B0930 References: <F41rhMOgRGkQ6mBySsx00002dc5@hotmail.com> <20010403105642.B71213@wantadilla.lemis.com>
next in thread | previous in thread | raw e-mail | index | archive | help
I've always found the lack of something equivalent to newgrp to be a bit of a hassle. Not a big hassle, just a bit of one.... I think the default file creation group *should* be a function of whatever creates the file (fopen(), etc), so it's hard to imagine it being set by a separate program or even an environment variable. I've never looked at source for Solaris' newgrp, so I don't know what it *really* does. ;) > Funny about this. I was just researching it yesterday. Can you say > what happens under Solaris if I (user grog) am a member of groups > lemis and wheel, and my currently active group is lemis, when I try to > open this file? > > -rw-r----- 1 root wheel 94 Mar 31 10:45 foo.c > > On FreeBSD, it will work, because there's no concept of "currently > active group". In Solaris, the newgrp-selected group only affects the "default", not the permissions. If you're in a group, you have permissions according to that group. Perhaps it sets the egid for the shell, and fopen()'s grab that instead of using the directory's group (notwithstanding the setgid bit)? I dunno. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010403022401.S12995>