1

I realized this has been asked before but unfortunately I don't have enough experience or enough time to continue crawling though the mountain of pages of search results that pop up for this. This is the last step in the configuration of a new sub system that needs is to be launched very soon. I'm hoping through the process of elimination from the responses I can figure out what is going on.

NFS shares are being mounted on a remote box but are being set with an UID that I have not configured. This is linux to linux NFS, nothing is on a domain nor is anything coming from a windows/mac share.

Set Up:

  • Source:

    • Debian 7, with owner of source files being rdebXXX, UID 1011
    • /etc/exports:
      /home/rdebXXX/test dev-www(rw,sync,no_subtree_check,anonuid=512,anongid=1003)
    • exportfs -a has been ran
    • The destination server can be pinged
    • No host name filtering is done, hosts.allow and hosts.deny is empty
  • Destination:

    • Debian 8, with owner of the target parent directory being signsXXX, UID 512. So the mount needs to hold the same owner.
    • /etc/fstab:
      x.x.x.x:/home/rdebXXX/test /home/signs/test nfs defaults,bg 0 0
    • The source server of x.x.x.x can be pinged
    • The mount is mounted with no mount errors
    • The UID of the mount is 1004, which maps to a rdebXXX account on the destination server. I'm pretty sure this is by accident, as the boxes/accounts where created at separate times manually.
    • The idmapd is running and idmap.conf has the default entries of:
      Nobody-User = nobody Nobody-Group = nogroup
  • Notes
    • I cannot change UID of the destination boxes. There are multiple NFS mounts coming into some of the new boxes from multiple sources, so changing the UID will not help in these situations as the UID change will only fix 1 mount.
    • I cannot change the source boxes because as was mentioned before, these are in a system that is currently used.

Any an all help would be much appreciated. I've tried what I know and have spent hours with google, but NFS can be so finicky it seams it is not always easy to pin point the cause.

Robert DeBoer
  • 121
  • 1
  • 4

1 Answers1

1

If I understand you correctly, then you want to map all request from client node to a specific UIG/GID on the server. For this you have to adjust your exports file as following:

/home/rdebXXX/test dev-www(rw,sync,no_subtree_check,anonuid=512,anongid=1003,all_squash)

The all_squash option tells server to map all requests to user nobody and the corresponding UID and GID you already have in the export options.

kofemann
  • 4,626
  • 1
  • 25
  • 30