Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Feb 2001 16:04:21 -0800
From:      "Crist J. Clark" <cjclark@reflexnet.net>
To:        Arcady Genkin <a.genkin@utoronto.ca>
Cc:        dannyman <dannyman@toldme.com>, freebsd-questions@FreeBSD.ORG
Subject:   Re: Change group ID in a shell script
Message-ID:  <20010202160421.W91447@rfx-216-196-73-168.users.reflex>
In-Reply-To: <87lmrpe7kv.fsf@tea.thpoon.com>; from a.genkin@utoronto.ca on Fri, Feb 02, 2001 at 04:51:28AM -0500
References:  <87vgqteb00.fsf@tea.thpoon.com> <20010202004144.A30084@dell.dannyland.org> <87r91hea7x.fsf@tea.thpoon.com> <20010202005517.B307@dell.dannyland.org> <87lmrpe7kv.fsf@tea.thpoon.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Feb 02, 2001 at 04:51:28AM -0500, Arcady Genkin wrote:
> dannyman <dannyman@toldme.com> writes:
> 
> > On Fri, Feb 02, 2001 at 03:54:26AM -0500, Arcady Genkin wrote:
> > > No, I chgrp is not what I want.  I'm running rsync to mirror a
> > > directory over network, so rsync can potentially create a bunch of new
> > > files.
> > 
> > rsync -g?
> 
> Nope, this means "preserve group".  The remote group and local group
> names do not coinside.
> 
> I solved the problem by writing a Perl script instead of a shell
> script (using Perl's `setpgrp').  I would still like to know how I
> could do that in a shell script, though.

It does not seem like it would matter for your purposes. The group ID
of a newly created file has nothing to do with the group of the user
creating it (aside from possibly giving permissions to write the
file) on a BSD system.
-- 
Crist J. Clark                           cjclark@alum.mit.edu


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?20010202160421.W91447>