Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 May 2014 20:52:37 -0400 (EDT)
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        Craig Yoshioka <craigyk@me.com>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: problems with chown as root on nfs4 export
Message-ID:  <349221658.1387859.1399078357152.JavaMail.root@uoguelph.ca>
In-Reply-To: <892DB38A-0F20-439F-828A-27F195C8EEBD@me.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Craig Yoshioka wrote:
>=20
> > From what I was told, trying a uid string is only a fallback
> > scenario for the client.  Instead, it turns out root (uid 0) was
> > improperly triggering a conditional that mapped it to nobody on
> > maproot exports.  I just tried a fixed version and it works now.
>=20
> Nevermind, I spoke too soon.  I hadn=E2=80=99t properly cleared the effec=
t of
> setting:
>=20
> echo N >/sys/module/nfs/parameters/nfs4_disable_idmapping
>=20
> but just to confirm, setting the above in linux clients does cause
> their SETATTR calls to pass the username instead of the uid.
>  Unfortunately, this setting is not the default.
>=20
Just to let everyone know. I just committed a patch (r265252) that fixes
this default Linux client case. It makes the server either handle numeric
uid/gid strings or return NFS4ERR_BADOWNER, depending on a sysctl called
vfs.nfsd.enable_stringtouid. (rfc-3530bis is still a draft, but I don't
think this patch will cause problems for older NFSv4 clients.)

Either way the new Linux client handles this, since it switches to using
<user>@<domain> when it sees NFS4ERR_BADOWNER.

Thanks go to Craig for reporting and testing this.

The patch should be MFC'd in 1 week. You can use the above fix on the Linux
client side if you don't have the server patch.

rick

>=20
> >>=20
> >>>=20
> >>>=20
> >>> 3. I can=E2=80=99t rule out misconfiguration.  but I=E2=80=99ve confi=
gured as
> >>> identically as I could, and tried a lot of small vairations.
> >>> these
> >>> are my current settings (the pipefs settings are the distro
> >>> defaults)
> >>>=20
> >>> _______________________________________________
> >>> freebsd-stable@freebsd.org mailing list
> >>> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> >>> To unsubscribe, send any mail to
> >>> "freebsd-stable-unsubscribe@freebsd.org"
>=20
> _______________________________________________
> freebsd-stable@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to
> "freebsd-stable-unsubscribe@freebsd.org"
>=20



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