<div dir="ltr"><div>Paul, thanks!  You understand exactly what I'm asking and what my problem is.</div><div> </div><div>Something seems to be going wrong (or incorrectly configured) with the NFS id mapping services on my Linux client or OmniOS server.</div><div> </div><div>I've setup the nfsmapid_domain and I believe it's working because before configuring it, everything was showing as nobody/nobody, but afterwards it shows the correct names.  (on the client)  I can also see in the client log and it's correctly mapping <a href="mailto:user@domain.com">user@domain.com</a> in the Linux rpc.idmapd domain.</div><div> </div><div>The problem is that when I create a file on the client, the server (OmniOS) is showing the UID of the user that created the file instead of mapping it using the name to the local UID.</div><div> </div><div>It looks like I can avoid the problem if I synchronize UIDs and GIDs across all servers (it's a small home network so it's not a big problem and I'm not using LDAP or NIS), but NFSv4 was supposed to avoid this problem by using name mapping so you didn't have to synchronize UIDs/GIDs.</div><div> </div><div> </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 4, 2014 at 3:59 PM, Paul B. Henson <span dir="ltr"><<a href="mailto:henson@acm.org" target="_blank">henson@acm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> From: Michael Rasmussen<br>
> Sent: Thursday, December 04, 2014 11:11 AM<br>
<span>><br>
> Yes, because you want to avoid Omnios presents ACL which is incompatible<br>
> with Linux ACL.<br>
<br>
</span>I don't believe the ACL has anything to do with NFSv4 id mapping? And a ZFS<br>
ACL presented over NFSv4 is perfectly compatible with Linux. It's not a<br>
Linux POSIX ACL, and cannot be manipulated with getfacl/setfacl, you need to<br>
use the nfs4 ACL tools, but it works fine.<br>
<br>
> <a href="http://forum.proxmox.com/threads/15793-CT-creation-on-NFS-" target="_blank">http://forum.proxmox.com/threads/15793-CT-creation-on-NFS-</a><br>
> Share?p=81530#post81530<br>
<br>
In that thread, the user fails to chmod via NFS:<br>
<br>
chmod: changing permissions of `/mnt/pve/proxCT/private/108.tmp': Operation<br>
not permitted<br>
<br>
The root cause of which was a setting of restricted for aclmode:<br>
<br>
vdev1/proxCT aclmode             restricted<br>
local<br>
<br>
Per the man page "An aclmode property of restricted will cause the chmod(2)<br>
operation to return an error when used on any file or directory which has a<br>
non-trivial ACL whose entries can not be represented by a mode."<br>
<br>
The user could have set the inherited ACL on the initial filesystem to a<br>
trivial ACL, in which case chmod would've worked fine over NFS.<br>
<br>
In any case, I don't see anything in that thread that seems relevant to<br>
NFSv4 id mapping, which unless I misunderstand is the problem the OP is<br>
trying to resolve.<br>
<br>
On that subject, NFSv4 id mapping seems to be working fine for me between an<br>
omnios client and server. On the server, the file system is mounted as:<br>
<br>
/export/user/henson on export/user/henson<br>
read/write/nosetuid/nodevices/nonbmand/exec/xattr/atime/dev=2c5025c<br>
<br>
And exported as:<br>
<br>
/export/user/henson     -       nfs     nosuid,sec=krb5i,sec=krb5p<br>
<br>
with the domain set:<br>
<br>
$ sharectl get -p nfsmapid_domain nfs<br>
nfsmapid_domain=<a href="http://csupomona.edu" target="_blank">csupomona.edu</a><br>
<br>
if I create a file on the server, it has the correct ownership:<br>
<br>
$ touch test_server<br>
$ ls -l test_server<br>
-rw-r--r--+ 1 henson csupomona 0 Dec  4 12:50 test_server<br>
<br>
on the client, the NFS export is mounted as:<br>
<br>
/mnt on files-www.csupomona.edu:/export/user/henson<br>
remote/read/write/setuid/devices/sec=krb5p/xattr/dev=85c0008 on Thu Dec  4<br>
12:50:01 2014<br>
<br>
the client has the same domain:<br>
<br>
$ sharectl get -p nfsmapid_domain nfs<br>
nfsmapid_domain=<a href="http://csupomona.edu" target="_blank">csupomona.edu</a><br>
<br>
The file created on the server shows up with the correct ownership:<br>
<br>
$ ls -l test_server<br>
-rw-r--r--+ 1 henson csupomona 0 Dec  4 12:50 test_server<br>
<br>
A file created on the client has the correct ownership:<br>
<br>
$ touch test_client<br>
$ ls -l test_client<br>
-rw-r--r--+ 1 henson csupomona 0 Dec  4 12:52 test_client<br>
<br>
And viewed back on the server, still correct:<br>
<br>
$ ls -l test_client<br>
-rw-r--r--+ 1 henson csupomona 0 Dec  4 12:52 test_client<br>
<br>
<br>
</blockquote></div><br></div>