Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Mar 2012 19:34:56 +0100
From:      "Patrick M. Hausen" <hausen@punkt.de>
To:        Slawa Olhovchenkov <slw@zxy.spb.ru>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: ZFS & NFS
Message-ID:  <114CC851-7F85-470D-B203-5B2E9E35B7BD@punkt.de>
In-Reply-To: <20120316174233.GN52973@zxy.spb.ru>
References:  <20120316172006.GM97848@zxy.spb.ru> <F53B6039-4404-49EF-88EC-96A5DDDAA881@punkt.de> <20120316174233.GN52973@zxy.spb.ru>

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






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?114CC851-7F85-470D-B203-5B2E9E35B7BD>