Eu tenho máquinas nfsserver e nfsclient.
No nfsserver:
# cat /etc/exports
/export gss/krb5p(rw,sync,fsid=0,no_subtree_check,crossmnt)
/export/home gss/krb5p(rw,sync,no_subtree_check)
No nfsclient, monta OK:
# mount -vvv -t nfs4 -o sec=krb5p nfsserver:/home /homex
mount: fstab path: "/etc/fstab"
mount: mtab path: "/etc/mtab"
mount: lock path: "/etc/mtab~"
mount: temp path: "/etc/mtab.tmp"
mount: UID: 0
mount: eUID: 0
mount: spec: "nfsserver:/home"
mount: node: "/homex"
mount: types: "nfs4"
mount: opts: "sec=krb5p"
mount: external mount: argv[0] = "/sbin/mount.nfs4"
mount: external mount: argv[1] = "nfsserver:/home"
mount: external mount: argv[2] = "/homex"
mount: external mount: argv[3] = "-v"
mount: external mount: argv[4] = "-o"
mount: external mount: argv[5] = "rw,sec=krb5p"
mount.nfs4: timeout set for Tue Apr 30 13:03:13 2013
mount.nfs4: trying text-based options 'sec=krb5p,addr=10.10.10.100,clientaddr=10.10.10.101'
nfsserver:/home on /homex type nfs4 (rw,sec=krb5p)
Mas só posso acessar esse diretório como root. Usuário regular recebe:
$ ls /homex
ls: cannot access /homex: Permission denied
$ df /homex
df: '/homex': Permission denied
df: no file systems processed
Liguei a depuração do NFS em ambos os lados (nfsserver, nfsclient) com rpcdebug
, mas a única coisa que vejo no nfsclient durante o usuário regular tentando acessar o diretório montado é:
Apr 30 12:51:19 nfsclient kernel: [ 5896.339330] NFS: permission(0:13/917551), mask=0x24, res=-13
Apr 30 12:51:32 nfsclient kernel: [ 5909.182185] NFS: revalidating (0:13/917551)
Apr 30 12:51:32 nfsclient kernel: [ 5909.189372] nfs_revalidate_inode: (0:13/917551) getattr failed, error=-13
Não há nada no lado do nfsserver (mesmo sem tráfego de rede ao farejar com o tcpdump).
As permissões de arquivo parecem estar corretas:
# ls -ld /homex
drwxr-xr-x 3 root root 4096 Apr 5 18:15 /homex
# ls -l /homex
total 4
drwxr-xr-x 6 mike mike 4096 Apr 29 13:48 mike
# df /homex
Filesystem 1K-blocks Used Available Use% Mounted on
nfsserver:/home
20640384 1390208 18201600 8% /homex
O microfone do usuário tem o mesmo UID nas duas máquinas.