Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Apr 1999 11:02:18 -0400 (EDT)
From:      Brian Dean <brdean@unx.sas.com>
To:        freebsd-hackers@freebsd.org
Subject:   behaviour of open(foo,O_CREAT) in regards to setting 'group'
Message-ID:  <199904121502.LAA15248@dean.pc.sas.com>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199904121502.LAA15248>