Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Sep 2009 13:12:37 +0200
From:      Romain =?iso-8859-1?Q?Tarti=E8re?= <romain@blogreen.org>
To:        Nate Eldredge <nate@thatsmathematics.com>
Cc:        freebsd-hackers@freebsd.org, Giulio Ferro <auryn@zirakzigil.org>
Subject:   Re: ZFS group ownership
Message-ID:  <20090916111237.GB1700@blogreen.org>
In-Reply-To: <Pine.GSO.4.64.0909151507080.8152@zeno.ucsd.edu>
References:  <4AAB8AD0.5010302@zirakzigil.org> <Pine.GSO.4.64.0909151507080.8152@zeno.ucsd.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

--MfFXiAuoTsnnDAfZ
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Sep 15, 2009 at 03:18:41PM -0700, Nate Eldredge wrote:
> >What I ask now is: is this a bug or a feature?
>=20
> Both, I think :)

Or none, just different implementation of the same open() function
complying with the Open Group Base Specifications ;-)

Quotting
http://www.opengroup.org/onlinepubs/009695399/functions/open.html

----------------8<------------------------------------------------------
O_CREAT
  [...] the file shall be created; the user ID of the file shall be set
  to the effective user ID of the process; the group ID of the file
  shall be set to the group ID of the file's parent directory or to the
  effective group ID of the process [...] Implementations shall provide
  a way to initialize the file's group ID to the group ID of the parent
  directory. Implementations may, but need not, provide an
  implementation-defined way to initialize the file's group ID to the
  effective group ID of the calling process.

[...]

The POSIX.1-1990 standard required that the group ID of a newly created
file be set to the group ID of its parent directory or to the effective
group ID of the creating process. FIPS 151-2 required that
implementations provide a way to have the group ID be set to the group
ID of the containing directory, but did not prohibit implementations
also supporting a way to set the group ID to the effective group ID of
the creating process. Conforming applications should not assume which
group ID will be used. If it matters, an application can use chown() to
set the group ID after the file is created, or determine under what
conditions the implementation will set the desired group ID.
----------------8<------------------------------------------------------


This being said, two different behaviour on the same system, even if you
=AB should not assume which group ID will be used =BB, is kind of weird.

--=20
Romain Tarti=E8re <romain@blogreen.org>        http://romain.blogreen.org/
pgp: 8DAB A124 0DA4 7024 F82A  E748 D8E9 A33F FF56 FF43 (ID: 0xFF56FF43)
(plain text =3Dnon-HTML=3D PGP/GPG encrypted/signed e-mail much appreciated)

--MfFXiAuoTsnnDAfZ
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.13 (FreeBSD)

iEYEARECAAYFAkqwyCUACgkQ2OmjP/9W/0OAOgCeMbFnHI/oCNsZoRzs1h6za7/d
ClwAnRqdy/MLOx1kYeQcclHSOXwiFjE2
=TSmb
-----END PGP SIGNATURE-----

--MfFXiAuoTsnnDAfZ--



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