NFS "Permission denied" errors

You may receive "Permission denied" errors when mounting an NFS share if the /etc/dfs/dfstab entry on the NFS server is not identical to your hostname. This can be caused if /etc/dfs/dfstab does not contain a fully-qualified domain name (FQDN), as in the following example.

showmount -e NFS_server
/opt/SUNWspro                   NFS_client

The /opt/SUNWspro directory is shared out to NFS_client.

# mount NFS_server:/opt/SUNWspro /opt/SUNWspro

nfs mount: NFS_server:/opt/SUNWspro: Permission denied

On NFS_server, we'll look at all traffic from NFS_client.

# snoop NFS_client

Using device /dev/hme (promiscuous mode) -> NFS_server     PORTMAP C GETPORT prog=100005 (MOUNT) vers=3 proto=UDP
    NFS_server -> PORTMAP R GETPORT port=53859 -> NFS_server     MOUNT3 C Null
    NFS_server -> MOUNT3 R Null -> NFS_server     MOUNT3 C Mount /opt/SUNWspro
    NFS_server -> MOUNT3 R Mount Permission denied

To correct the "Permission denied," we have to either modify /etc/dfs/dfstab on NFS_server to contain the FQDN and run shareall or we can add an entry in /etc/hosts with the IP address and "short" hostname of NFS_client. Of the two, I recommend adding the FQDN to /etc/dfs/dfstab.

showmount -e NFS_server

You should now be able to mount the file system.
# mount NFS_server:/opt/SUNWspro /opt/SUNWspro

Back to
Last modified: 09/24/2004