As mentioned in post title it is not about NFS mount issues but some issues that I’ve seen on client because of options used while mounting.
- Not able to execute shell script:
We have a bash shell script and getting permission denied error while running it. Execute permissions are set “755”. Checked if the bash interpretor mentioned as first line and it is present “#!/bin/bash”.
A: When we run the script with “/bin/bash script.sh” then it is executing with no problems. In the end found that the script is on a mount which is mounted with option “noexec”. While running with bash we are asking the shell to execute the script on behalf of us so it is being executed fine.
2. Files with nobody:nobody permissions:
Files in mounted folder owned by nobody:nobody – I’ve tried to change using chown with the existing username and group which also present on the NFS server but still nobody:nobody.
A: Problem is with NFSv4. It expects the server and client to be present in the same domain but our client system in different domain compared to the nfs server.
Check in /etc/idmapd.conf for domain configuration. We can also configure the default nobody user and nobody group to something that we want. After updating the entries restart the “rpcidmapd” process and clear the idmap cache using “nfsidmap -c”.