NFS v3 inconsistent user permissions


#suse's /etc/fstab
/dev/sdb1 /windows/FAT vfat users,uid=1000,gid=100,rw,utf8=true


#/etc/exports
/windows/FAT 192.168.0.0/24(rw,root_squash,no_subtree_check)


#mint's /etc/fstab
suse-amd:/windows/FAT /media/nfs/suse-amd/FAT nfs rw,user 0 0

The main problem I was having was mapping different UID/GID over NFS v3. I managed to just have different ‘usernames’ but same UID/GID that would mount the share. And it sorta works. I can `touch’ a file on the terminal after mounting (NFS), but in both Nautilus and Thunar (on Mint v8) I get permission denied when i try to create new file → but a brand-new file appears in the file browser after refresh!

I run opensuse 11.2 with NFS3 sharing a FAT32 partition /windows/FAT. The username is ‘felipe’ with UID=1000 and GID=100. I mounted it with `uid=1000,gid=100’ vfat mount options (see above).

Ubuntu 9.10 machine (mint actually) connects to it successfully, but the user connecting to it is under a different username (ruben), different GID (1000), but same UID=1000.

I’m not sure if the error is in the /etc/exports, in the Mint `mount -t nfs’ command or in the file browsers nautilus and thunar.
**
Why do I get these errors in Nautilus/Thunar and not in a terminal?

How can I prevent these from happening?

What is the best way to share files from GNU to GNU machine?**

And clues or ideas would be very much appreciated!
(ps - nfs v4 is not possible ATM)

*edit: advice from a google search didn’t work:
/share *(rw,anonuid=150,anongid=100)
*

Unfortunately the UIDs have to match. It works in a different way from CIFS. So you have to unify the UID space between the machines.

There is a service called rpc.ugidd that is supposed to be able to do UID mapping. Maybe you can look it up. I’ve never used it myself.

On Tue, 2010-02-02 at 21:36 +0000, ken yap wrote:
> Unfortunately the UIDs have to match. It works in a different way from
> CIFS. So you have to unify the UID space between the machines.

Alternatively you could try NFS4 instead of NFS3 (if supported).

Oh! NFS v4. Will it let me arbitrarily map UID’s?

As long as the UIDs are the same, does the username matter at all? In the original posting, the UIDs on both machines was 1000, but names were different. `touch’ works, but permission-denied errors show in Nautilus, even though the write occurred!

The permissions on the objects are based on the UIDs. It doesn’t matter what name is associated with the UID, but of course if you do a ls -l, the name that appears is that in the local /etc/passwd.