From owner-freebsd-stable@FreeBSD.ORG Fri Mar 16 18:34:58 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 809351065673 for ; Fri, 16 Mar 2012 18:34:58 +0000 (UTC) (envelope-from hausen@punkt.de) Received: from kagate.punkt.de (kagate.punkt.de [217.29.33.131]) by mx1.freebsd.org (Postfix) with ESMTP id 0F9D48FC18 for ; Fri, 16 Mar 2012 18:34:57 +0000 (UTC) Received: from hugo10.ka.punkt.de ([217.29.45.10]) by gate1.intern.punkt.de with ESMTP id q2GIYuV3015179; Fri, 16 Mar 2012 19:34:56 +0100 (CET) Received: from [217.29.46.10] ([217.29.46.10]) by hugo10.ka.punkt.de (8.14.2/8.14.2) with ESMTP id q2GIYuaR084551; Fri, 16 Mar 2012 19:34:56 +0100 (CET) (envelope-from hausen@punkt.de) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=iso-8859-1 From: "Patrick M. Hausen" In-Reply-To: <20120316174233.GN52973@zxy.spb.ru> Date: Fri, 16 Mar 2012 19:34:56 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <114CC851-7F85-470D-B203-5B2E9E35B7BD@punkt.de> References: <20120316172006.GM97848@zxy.spb.ru> <20120316174233.GN52973@zxy.spb.ru> To: Slawa Olhovchenkov X-Mailer: Apple Mail (2.1257) Cc: freebsd-stable@freebsd.org Subject: Re: ZFS & NFS X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 18:34:58 -0000 Hello, Am 16.03.2012 um 18:42 schrieb Slawa Olhovchenkov: > On Fri, Mar 16, 2012 at 06:32:43PM +0100, Patrick M. Hausen wrote: >=20 >> Hello, >>=20 >> Am 16.03.2012 um 18:20 schrieb Slawa Olhovchenkov: >>> I do NFSv3 export of ZFS. >>> root from remote host create files on ZFS witch uid 2^32-2: >>>=20 >>> # ls -l /usr/ports/packages32/ >>> total 6 >>> drwxr-xr-x 2 4294967294 wheel 5 Mar 17 00:57 All >>> drwxr-xr-x 2 4294967294 wheel 5 Mar 17 00:57 Latest >>> drwxr-xr-x 2 4294967294 wheel 3 Mar 17 00:52 archivers >>> drwxr-xr-x 2 4294967294 wheel 4 Mar 17 00:57 lang >>=20 >>=20 >> Yes? This is expected behaviour of NFS. If you don't want that, try >>=20 >> -maproot=3Droot >>=20 >> either in sharenfs option to zfs or /etc/exports, whichever it is you = are using. >=20 > hmm... > nobody:*:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin >=20 > 65534 !=3D 4294967294 (2^16-2 !=3D 2^32-2) >=20 > Also, I am think ZFS+NFS will be wrong for UID>2^15. I admit I overlooked that one (16 vs 32 bits). But if I'm not mistaken, = NFS does not care a bit about the name of the user "nobody" or the UID in /etc/passwd or = what-have-you. It simply sets the UID of remote root (UID 0) to the value -1. And 4294967294 happens to be -1 in 32 bits signed. So - possibly this is = built into ZFS this way. I would at least give the sharenfs=3D"..." options a try = ... HTH, Patrick --=20 punkt.de GmbH * Kaiserallee 13a * 76133 Karlsruhe Tel. 0721 9109 0 * Fax 0721 9109 100 info@punkt.de http://www.punkt.de Gf: J=FCrgen Egeling AG Mannheim 108285