I have two RedHat 4 Servers. The client is 4.6, the server is 4.5. I'm attempting to mount a share from the server, onto the client via NFS.
The /etc/exports configuration is as follows:
/opt/data/config bkup(rw,no_root_squash,async)
/opt/data/db bkup(rw,no_root_squash,async)
exportfs returns these (among other) shares, nfs is running according to ps
output.
I've been attempting to use autofs on the client, but have opted to just mount the share manually considering the issues I'm having.
So, I issue the mount request:
mount dist:/opt/data/config /mnt/config
mount: dist:/opt/data/config failed, reason given by server: Permission denied
Ok, so let's see what the server has to say for itself.
May 6 23:17:55 dist mountd[3782]: authenticated mount request from bkup:662 for /opt/data/config (/opt/data/config)
It says it allowed the mount to take place.
How can I diagnose why the client and server are disagreeing on the result?
This is a good example of the difference between authentication and authorization. In this scenario the authentication succeeded, but the authorization on the host's directory is likely to be the problem. To test, you can try setting the host's directory permissions recursively to 777 (don't forget to change this again later).
Things to check:
Check if there are some files in
/proc/fs/nfsd
.If not, issue this comand:
If there are, I don't know either.
I usually debug this kind of problems with tcpdump. The raw packet capture always tells something or other.
Start the packet capture from both NFS client and server.
Replace ethX with eth1 or 2 or whatever you have.
Then, look for RPC transmissions in the packet capture. I prefer wireshark and see the TCP section. I have often seen it provides some kind of clue.
Next step would be to enable NFS debug logs.
I would highly request you to keep the tcpdump data to yourself or get it checked with someone you trust.