Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Feb 2001 00:41:44 -0800
From:      dannyman <dannyman@toldme.com>
To:        Arcady Genkin <antipode@thpoon.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Change group ID in a shell script
Message-ID:  <20010202004144.A30084@dell.dannyland.org>
In-Reply-To: <87vgqteb00.fsf@tea.thpoon.com>; from antipode@thpoon.com on Fri, Feb 02, 2001 at 03:37:35AM -0500
References:  <87vgqteb00.fsf@tea.thpoon.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Feb 02, 2001 at 03:37:35AM -0500, Arcady Genkin wrote:
> I'm writing a script to be run from cron that needs to execute a
> command with effective group ID different from my login group.
> 
> How would I change effective GID in a shell script?  Linux has sg(1)
> command for this purpose.  I couldn't find newgrp command, either.

Are you creating a file that then has to end up in a certain group, or
something?  Assuming you are in a group, you can do what you want just fine.
If you have to set the group on a file you create, you can then just chgrp.

-danny


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?20010202004144.A30084>