NFS Share Not Mounting On Debian Client From Centos NFS Server

Discussion in 'Linux Networking' started by Nrth, Aug 15, 2012.

  1. Nrth

    Nrth Guest

    Hello,

    I appear to be having some problems with what many of you may consider to
    be a fairly trivial matter (I know I did at first). I have a Centos 6.3
    NFS server that happily hands out shares to other Centos 6.3 NFS clients
    but due to some configuration mistake I've made I can't mount the same
    (one and only) share on a Debian Squeeze NFS client.

    I would be most grateful if any kind soul/s would put an end to further
    hair loss and wood-for-the-trees-ness that has consumed much of my
    afternoon today. As an aside, I'm an X-Files fan which is just about to
    become apparent to many.

    On the Centos 6.3 x86_64 server in /etc/exports :

    /home/pete/ doggett.nrth.lab(rw,no_root_squash)

    The NFS-related services running on this server all appear in order in
    that I have rpc.statd, rpc.mountd and rpcbind all correct and present.

    On the Debian Squeeze amd64 client I have rpcbind and rpc.statd running.
    I've tried modifying /etc/default/nfs-common on the Debian client to
    include the following line :

    NEED_IDMAPD=yes

    .. as I believe the NFS server on the Centos box is running that
    version. (As it turns out, it doesn't matter whether I have that option
    enabled or not, I still cannot browse to the mounted share using
    Nautilus.)

    On the Debian Squeeze amd64 client I run this command :

    mount -t nfs tooms.nrth.lab:/home/pete /home/pete/serverdocs

    There is no error shown and I get an HD icon on my desktop, but if I try
    to navigate into this share using Nautilus, I receive an access denied
    message stating possible reasons for this error as lack of permissions.
    Fair enough, but I can't see what to change.

    Despite the above error, I can access the mounted share as root on the
    Debian client and modify files. However, I cannot even change into that
    directory as user 'pete' on the Debian client.

    The only possible cause I can think of is UIDs that are different and not
    being mapped. For example, on the server the user 'pete' has a UID and GID
    of 500 whereas on the client the same account has 1000.

    Any help or information would be gratefully received.


    Regards,

    Pete.
     
    Nrth, Aug 15, 2012
    #1
    1. Advertisements

  2. Nrth

    Nrth Guest

    Hello,

    Thanks for the reply and sorry for various omissions. I believe the
    server is NFSv4. The (Debian) client I'm not so sure about as it appears
    to be able to talk all three versions. By the way, there are no firewalls
    active between these two machines.

    After checking your supplied URL and digging a little deeper, I found
    with which I'm happy although it may not be to everyone's taste.

    First of all, the /etc/exports line as it stands now.

    /home/pete/ doggett.nrth.lab(rw)

    I've removed 'no_root_squash' and indeed root on the client cannot access
    the mounted NFS share, neither can any other user which was as expected
    so that'll do for now.

    Any other user that is, apart from myself. I found this very useful page
    and within was the solution which I found most suitable.

    http://www.troubleshooters.com/linux/
    nfs.htm#_Mounting_an_NFS_Share_on_a_Client


    The solution (for me) was to change the UID and GID of my user account on
    the Debian box to match that of the server's record of the same username.
    So 'pete' on both boxes is now '500' in /etc/passwd and /etc/group. A
    quick chown -R pete:pete /home/pete and a (reflex) reboot and the
    following mount command worked as before but this time I was able to
    access the share.

    mount -t nfs4 tooms.nrth.lab:/home/pete /home/pete/serverdocs

    Thanks again for the reply and for the motivation.

    Regards,

    Pete.
     
    Nrth, Aug 15, 2012
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.