Date: Fri, 2 Feb 2001 21:28:54 -0800 From: "Crist J. Clark" <cjclark@reflexnet.net> To: Arcady Genkin <a.genkin@utoronto.ca> 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> In-Reply-To: <877l38efzn.fsf@tea.thpoon.com>; from a.genkin@utoronto.ca on Fri, Feb 02, 2001 at 08:02:04PM -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> <20010202160421.W91447@rfx-216-196-73-168.users.reflex> <877l38efzn.fsf@tea.thpoon.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Feb 02, 2001 at 08:02:04PM -0500, Arcady Genkin wrote: > "Crist J. Clark" <cjclark@reflexnet.net> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010202212854.B91447>