From owner-freebsd-questions Fri Feb 2 21:29:59 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mailhost01.reflexnet.net (mailhost01.reflexnet.net [64.6.192.82]) by hub.freebsd.org (Postfix) with ESMTP id E8BBE37B491 for ; Fri, 2 Feb 2001 21:29:40 -0800 (PST) Received: from rfx-216-196-73-168.users.reflexcom.com ([216.196.73.168]) by mailhost01.reflexnet.net with Microsoft SMTPSVC(5.5.1877.197.19); Fri, 2 Feb 2001 21:27:48 -0800 Received: (from cjc@localhost) by rfx-216-196-73-168.users.reflexcom.com (8.11.1/8.11.1) id f135SsW40221; Fri, 2 Feb 2001 21:28:54 -0800 (PST) (envelope-from cjc) Date: Fri, 2 Feb 2001 21:28:54 -0800 From: "Crist J. Clark" To: Arcady Genkin Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Change group ID in a shell script Message-ID: <20010202212854.B91447@rfx-216-196-73-168.users.reflex> Reply-To: cjclark@alum.mit.edu 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> <20010202160421.W91447@rfx-216-196-73-168.users.reflex> <877l38efzn.fsf@tea.thpoon.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <877l38efzn.fsf@tea.thpoon.com>; from a.genkin@utoronto.ca on Fri, Feb 02, 2001 at 08:02:04PM -0500 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Feb 02, 2001 at 08:02:04PM -0500, Arcady Genkin wrote: > "Crist J. Clark" writes: > > > > 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. > > Ooops, you are right. Then I haven't solved the problem (I only > tested the script on the Solaris side until I read your message). In > this case, let me rephrase the question into two: > > 1. How do I change process's user group in a shell script? I do not think a mortal user can. And I am not sure why one would want to. > 2. How do I make sure files are created with a certain group > ownership in a shell script? I am not aware of a way in BSD to have a file created with a specific group ownership using regular commands. All I can suggest is to chgrp(1) files once created. -- 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