I have what I think is a very simple setup, but I must be missing something very simple.
On the proxmox server, I have a zpool and a zfs dataset and I export it via NFS.
On the client (happens to be CentOS 7.x) I mount the nfs share via nfsv3 and it shows different ownership and permissions than on the server! What am I missing? Is it something about nfs v3 vs v4? Is it something about apparmor?
Here is the server side:
root@regulated01:~# zfs set acltype=posixacl tank
root@regulated01:~# cat /etc/exports | tail -n 1
/tank/regulated 10.0.0.0/8(rw,async,root_squash,no_subtree_check)
root@regulated01:~# exportfs -rv
exporting 10.0.0.0/8:/tank/regulated
root@regulated01:~# ls -alhd /tank/
drwxr-xr-x 3 root root 3 Feb 1 16:10 /tank/
root@regulated01:~# ls -alhd /tank/regulated/
drwxr-xr-x 3 root root 3 Feb 1 16:15 /tank/regulated/
root@regulated01:~# ls -alhd /tank/regulated/ukbb/
drwxr-x--- 2 13040 12711 2 Feb 1 16:15 /tank/regulated/ukbb/
Here is the client side:
[root@sci-vm-020 ~]# mount -t nfs -o vers=3 regulated01:/tank/regulated /mnt/test/
[root@sci-vm-020 ~]# ls -alh /mnt/test/ukbb/
total 1.0K
drwxr-xr-x 2 root root 2 Feb 1 16:15 .
drwxr-xr-x 3 root root 3 Feb 1 16:15 ..
/proc/mounts shows
regulated01:/tank/regulated /mnt/test nfs rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=10.11.10.95,mountvers=3,mountport=33792,mountproto=udp,local_lock=none,addr=10.11.10.95 0 0
How is it possible that it shows root:root and 0755 on the client side and other ownership and permissions on the server side?
I also tried mounting via nfsv4, same result:
[root@sci-vm-020 ~]# mount -t nfs regulated01:/tank/regulated /mnt/test/
regulated01:/tank/regulated /mnt/test nfs4 rw,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.11.14.89,local_lock=none,addr=10.11.10.95 0 0
[root@sci-vm-020 ~]# ls -alh /mnt/test/
total 1.0K
drwxr-xr-x 3 root root 3 Feb 1 16:15 .
drwxr-xr-x. 5 root root 53 Feb 4 10:58 ..
drwxr-xr-x 2 root root 2 Feb 1 16:15 ukbb
On the proxmox server, I have a zpool and a zfs dataset and I export it via NFS.
On the client (happens to be CentOS 7.x) I mount the nfs share via nfsv3 and it shows different ownership and permissions than on the server! What am I missing? Is it something about nfs v3 vs v4? Is it something about apparmor?
Here is the server side:
root@regulated01:~# zfs set acltype=posixacl tank
root@regulated01:~# cat /etc/exports | tail -n 1
/tank/regulated 10.0.0.0/8(rw,async,root_squash,no_subtree_check)
root@regulated01:~# exportfs -rv
exporting 10.0.0.0/8:/tank/regulated
root@regulated01:~# ls -alhd /tank/
drwxr-xr-x 3 root root 3 Feb 1 16:10 /tank/
root@regulated01:~# ls -alhd /tank/regulated/
drwxr-xr-x 3 root root 3 Feb 1 16:15 /tank/regulated/
root@regulated01:~# ls -alhd /tank/regulated/ukbb/
drwxr-x--- 2 13040 12711 2 Feb 1 16:15 /tank/regulated/ukbb/
Here is the client side:
[root@sci-vm-020 ~]# mount -t nfs -o vers=3 regulated01:/tank/regulated /mnt/test/
[root@sci-vm-020 ~]# ls -alh /mnt/test/ukbb/
total 1.0K
drwxr-xr-x 2 root root 2 Feb 1 16:15 .
drwxr-xr-x 3 root root 3 Feb 1 16:15 ..
/proc/mounts shows
regulated01:/tank/regulated /mnt/test nfs rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=10.11.10.95,mountvers=3,mountport=33792,mountproto=udp,local_lock=none,addr=10.11.10.95 0 0
How is it possible that it shows root:root and 0755 on the client side and other ownership and permissions on the server side?
I also tried mounting via nfsv4, same result:
[root@sci-vm-020 ~]# mount -t nfs regulated01:/tank/regulated /mnt/test/
regulated01:/tank/regulated /mnt/test nfs4 rw,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.11.14.89,local_lock=none,addr=10.11.10.95 0 0
[root@sci-vm-020 ~]# ls -alh /mnt/test/
total 1.0K
drwxr-xr-x 3 root root 3 Feb 1 16:15 .
drwxr-xr-x. 5 root root 53 Feb 4 10:58 ..
drwxr-xr-x 2 root root 2 Feb 1 16:15 ukbb