Help - Search - Members - Calendar
Full Version: NFS UID problem
Neowin Forums > *nix Customization & Support > Linux Server/BSD/Unix
hornett
I'd like to be able to mount my home directory on my server (Fedora 3) via NFS onto my client (Gentoo) as /mnt/nfs-retro.

I have my main user name setup as retro on both machines, however the UID and GID numbers for this user differ between the machines.

On Fedora my UID and GID are both 500, however on my Gentoo machine they are 1000 and 100 respectively.

I've been told to use the anon UID and GID settings but I can't make these work either. sad.gif

Here is the contents or /etc/exports on the server (Fedora):

CODE
/                        192.168.1.0/24(ro,async)
/mnt/fat-media           192.168.1.0/24(rw,async)
/home/retro              192.168.1.0/24(rw,async,all_squash,anonuid=500,anongid=500)


Here is the relevant line from /etc/fstab on the client (Gentoo):
CODE
192.168.1.102:/home/retro /mnt/nfs-retro nfs  rw   0 0


However, this still does not allow access to the share from the laptop as retro.

This is what I get:
CODE
retro@d600 ~ $ cd /mnt/nfs-retro/
-bash: cd: /mnt/nfs-retro/: Permission denied


Interestingly, as root on the client, I am granted access.
CODE
d600 mnt # cd /mnt/nfs-retro/
d600 nfs-retro # ls
Work


Any ideas anyone?

PS I tried changing my UID and GID on the client by altering /etc/passwd and using chown retro /home/retro -R but despite all the files being set, Gnome will not start. hmm.gif I get to nautilus but there are lots of dialogs complaining about various errors and I get no panels etc.
hornett
Ug, gnome was easy to fix in the end and NFS 'just works' now. biggrin.gif

All I did was use usermod to change my UID, and to fix gnome I simply had to chown /tmp/gconfd-retro back to myself. smile.gif
mr_daemon
The lastest greatest and mostly unused NFS allows binding of UIDs accross servers, I believe.

But yeah, usually having UIDs match is the nicest way. Don't forget to chown your files back to you afterwards.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.