From owner-freebsd-hackers Mon Apr 12 8: 4:47 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from lamb.sas.com (lamb.sas.com [192.35.83.8]) by hub.freebsd.org (Postfix) with ESMTP id A5C53155B5 for ; Mon, 12 Apr 1999 08:04:44 -0700 (PDT) (envelope-from brdean@unx.sas.com) Received: from mozart (mozart.unx.sas.com [192.58.184.8]) by lamb.sas.com (8.9.1/8.9.1) with SMTP id LAA20278 for ; Mon, 12 Apr 1999 11:02:26 -0400 (EDT) Received: from dean.pc.sas.com by mozart (5.65c/SAS/Domains/5-6-90) id AA03385; Mon, 12 Apr 1999 11:02:19 -0400 Received: (from brdean@localhost) by dean.pc.sas.com (8.9.3/8.9.1) id LAA15248; Mon, 12 Apr 1999 11:02:18 -0400 (EDT) (envelope-from brdean) From: Brian Dean Message-Id: <199904121502.LAA15248@dean.pc.sas.com> Subject: behaviour of open(foo,O_CREAT) in regards to setting 'group' To: freebsd-hackers@freebsd.org Date: Mon, 12 Apr 1999 11:02:18 -0400 (EDT) X-Mailer: ELM [version 2.4ME+ PL43 (25)] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, In FreeBSD, the open(foo,O_CREAT) call creates the file and sets the group of the new file to that of the directory in which the file was created. Why do we not set the group of the new file to the effective group id of the process creating the file? Or, if the set-gid bit is set on the directory in which the file is being created, use that over the effective gid of the process? (This appears to be the behaviour of SVR4.) For example, if the group of /tmp is wheel, the FreeBSD behaviour causes files created there to have the group of wheel, and when the files are moved to another (non-local) file system (using 'mv'), an error is generated indicating that the operation is not permitted if the user is not a member of 'wheel'. The error is harmless in this case (because the group of the file should not have been wheel in the first place because the user was not a member of wheel), but it is annoying. Thanks, -Brian -- Brian Dean brdean@unx.sas.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message