I followed the following tutorial to configure nfsv4 with kerberos https://help.ubuntu.com/community/NFSv4Howto (with the difference that the NFS server is managed by zfsonlinux). Kerberos is here only used to secure the NFS mount (to prevent users to plug their own laptop on the ethernet and mount nfs with rw), users/groups/auths are managed with OpenLDAP.

I exported one of the shares with sec=krb5 and then mount it on another machine. All users should have access to files (with ownership and permissions mapped as with non-kerberos NFS/LDAP). The problem is that when listing the mount with users other than root:

$ ls /mnt/nfs/
ls: cannot open directory '/mnt/nfs/': Stale file handle

even though all users are allowed to read the folder:

$ ll /mnt/
total 25
drwxr-xr-x  3 root root 4096 Jul 22 16:05 ./
drwxr-xr-x 24 root root 4096 Jul 25 06:12 ../
drwxrwxr-x  9 root sudo    9 May 20 14:27 nfs/

and root can read it, all the files are here, and ownerships mapped properly.

$ sudo ls -la /mnt/nfs/
total 56
drwxrwxr-x 9 root   sudo          9 May 20 14:27 .
drwxr-xr-x 3 root   root       4096 Jul 22 16:05 ..

Any idea?


1 Answer 1


This error usually occurs if you are not authenticated via kerberos. I authenticate with kerberos using the "kinit" command. It's important that you execute this as the user you want to use the share with, not the root user. The syntax is: $ kinit some-kerberos-principal/some-kerberos-group For example, if your kerberos principal is called admin/admin, enter this command: $ kinit admin/admin Then retry.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .