From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 16 10:37:19 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF539106566C for ; Wed, 16 Sep 2009 10:37:19 +0000 (UTC) (envelope-from ady@ady.ro) Received: from mail-ew0-f208.google.com (mail-ew0-f208.google.com [209.85.219.208]) by mx1.freebsd.org (Postfix) with ESMTP id 723038FC08 for ; Wed, 16 Sep 2009 10:37:18 +0000 (UTC) Received: by ewy4 with SMTP id 4so4926681ewy.36 for ; Wed, 16 Sep 2009 03:37:18 -0700 (PDT) MIME-Version: 1.0 Sender: ady@ady.ro Received: by 10.210.60.13 with SMTP id i13mr2116311eba.8.1253097437594; Wed, 16 Sep 2009 03:37:17 -0700 (PDT) In-Reply-To: References: <4AAB8AD0.5010302@zirakzigil.org> From: Adrian Penisoara Date: Wed, 16 Sep 2009 12:36:57 +0200 X-Google-Sender-Auth: b514af0de0d78dfc Message-ID: <78cb3d3f0909160336m2d1f93dsad4aafb692395a80@mail.gmail.com> To: Nate Eldredge Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Giulio Ferro Subject: Re: ZFS group ownership X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Sep 2009 10:37:19 -0000 Hi, On Wed, Sep 16, 2009 at 12:18 AM, Nate Eldredge wrote: [...] > [On UFS, files are created with the same group as the directory that > contains them. =A0On ZFS, they are created with the primary group of the = user > who creates them.] > >> What I ask now is: is this a bug or a feature? > > Both, I think :) > > The behavior you describe on UFS (group comes from the directory) is > standard for BSD-based systems like FreeBSD. =A0On SysV-based systems, > however, the default is that the group comes from the user, as you descri= be > on ZFS. =A0ZFS was originally developed for Solaris, a descendent of SysV= , so > it's not surprising that it also has this behavior. =A0However, this is a= t > least a documentation bug, since the open(2) man page describes the BSD > behavior without mentioning exceptions. Is the ownership of the new file decided by the open() syscall or by the filesystem layer ? On a superficial lookup through the sources it appears a filesystem layer choice... Which of the following would then be the best option (also taking POLA into account): * leave things are they are * make ZFS under FreeBSD behave the way open(2) describes * have a new ZFS property govern the behavior and default to one of the ab= ove Thanks, Adrian Penisoara EnterpriseBSD