Nfs – Mounting NFS share from OpenSolaris on Linux

file-sharingnfsopensolarispermissionssolaris

I have an OpenSolaris server (snv_101b) serving files via NFS. Everything works fine when mounting the shares on ESXi or OS X, but when I mount from Linux (CentOS 5.2) everything is mounted as nobody:nobody with 755 permissions. This means that the user cannot make any changes. How do I mount the share correctly?

The directory was shared with:

# zfs set sharenfs=on /tank/share

And is mounted with:

# mount -t nfs4 server:/tank/share /mountpoint

Best Answer

NFSv4 does user@DOMAIN lookups (not simple UID/GID enforcement like NFSv3) so you need to have the same authentication database (files, LDAP, whatever) on both systems. With v3 all you need is to have the same UID/GID as the file...not necessarily the same username. If you don't need any of the features of v4, I'd recommend going with v3 on Linux. Historically, Linux has had a pretty flaky v4 implementation.