Saltar al contenido

~ / archivo / stackoverflow / 35030017

mount failed, reason given by server: Permission denied

StackOverflow · linux, centos, mount, nfs · ayudé
  1. 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/home I am getting this:
    mount: 10.10.10.1:/logs/user failed, reason given by server: Permission denied

  2. Siddharth sharma respuesta +1 2016-01-27 07:02

    Try these following points:-

    1. You need to run the command on the server after modifying the /etc/exports file:

      exportfs -a

    2. 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.

    3. 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:off
      
    4. check NFS Server logs

    5. If you are using RedHat base system then check if selinux is properly set. Disable selinux temporary by setenforce 0 command and test.

    • Alessandro L. 2019-09-03 09:01 Had the same problem, solved by running sudo exportfs -a
  3. Riyas vk respuesta 2016-01-27 08:08

    Please check server logs for more details:
    /var/log/messages

    Please 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:
    #sestatus

    If it is turned ON you need to check /var/log/audit.log for more details

  4. Miguel Ortiz yo respuesta 2018-09-17 17:46

    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.

← todos los hilos de StackOverflow