~ / archivo / stackoverflow / 35030017
mount failed, reason given by server: Permission denied
-
ASON pregunta 2016-01-27 06:11
I am using centos. I am trying to mount a server directory to the local directory.
server:10.10.10.1
client:10.10.10.2
the /etc/exports at the server has this content
/logs/user *(rw,sync,no_root_squash,no_subtree_check)
When I run the command
# showmount -e 10.10.10.1, it shows,
Export list for 10.10.10.1: /logs/user *now when I try to mount
mount -t nfs 10.10.10.1:/logs/user /mnt/nfs/homeI am getting this:
mount: 10.10.10.1:/logs/user failed, reason given by server: Permission denied -
Try these following points:-
You need to run the command on the server after modifying the /etc/exports file:
exportfs -a
Check your /etc/exports file and make sure that the volume is exported and that your client has the right kind of access to it. For example, if a client only has read access then you have to mount the volume with the ro option rather than the rw option.
services running on nfs clients
chkconfig --list|grep rpc rpcbind 0:off 1:off 2:on 3:on 4:on 5:on 6:off rpcgssd 0:off 1:off 2:off 3:on 4:on 5:on 6:off rpcidmapd 0:off 1:off 2:off 3:on 4:on 5:on 6:off rpcsvcgssd 0:off 1:off 2:off 3:off 4:off 5:off 6:off chkconfig --list|grep nfs nfs 0:off 1:off 2:off 3:off 4:off 5:off 6:off nfslock 0:off 1:off 2:off 3:on 4:on 5:on 6:offcheck NFS Server logs
If you are using RedHat base system then check if
selinuxis properly set. Disableselinuxtemporary bysetenforce 0command and test.
- Alessandro L. 2019-09-03 09:01 Had the same problem, solved by running
sudo exportfs -a
-
Riyas vk respuesta 2016-01-27 08:08
Please check server logs for more details:
/var/log/messagesPlease make sure "/logs/user" is not already a mount point on the server!
For eg:
you mount an NFS share to "/logs/user" on the server and then re-export it to the client, that is not supported.Please see whether selinux is turned ON on the server:
#sestatusIf it is turned ON you need to check /var/log/audit.log for more details
-
It happened to me today. After restarting the NFS service I've realized that I had changed the names of a couple of directories declared in
/etc/exports.So, check every path, restart your NFS service and verify it load without errors.