View Full Version : [all variants] nfs permissions problems/same username different uid/gid

March 13th, 2009, 08:33 AM
I have two boxes on my network sharing files via NFS. Let's call them server and client. My problem is the permissions on the client are messed-up. I think it is because my user has a different uid/gid on the server than it does on the client.

Here is my /etc/passwd on the server:

Here is my /etc/exports on the server:

Here is my /etc/passwd on the client:

Here is my /etc/fstab on the client: /mnt/share nfs defaults,auto,noatime 0 0
Here is a listing of the share mounted on the client:

$ ls -lh
drwxrwxr-x 10 100 102 138 2009-02-15 11:28 share

As you can see, the permissions aren't 'squeeze:squeeze' they are '100:102' which don't exist on the client and as such, some of my scripts aren't functioning properly. As you can see in my server's /etc/export, I have tried using the anonuid/anongid options, but they don't seem to be translated to the client. Is there a work-around via the way I am mounting/exporting the share?

March 14th, 2009, 12:06 PM
Finally got it figured out. Make the uid/gid match the user ON THE SERVER and add the 'all_squash' option.

Here is my /etc/exports on the server:


Now I can rw to the nfs share... the owner still appears as 100:102 but oh well.