Help - Search - Members - Calendar
Full Version: Problems with writable NFS share
MandrivaUsers.org > Advanced Topics > Networking
NickDeGraeve
I'm trying to create a writeable NFS share but I can never write to it.

I used DrakNFS to create the share on my server (HAL9000). The resulting config file looks like this:
CODE
[root@HAL9000 ~]# cat /etc/exports
# generated by drakhosts.pl
/home/nick/Music 192.168.0.*(no_all_squash,async,secure,no_subtree_check,rw)


When I mount it on my client it isn't writeable:
CODE
[nick@LT-NDG: ~/mnt]$ sudo mount -t nfs hal9000:/home/nick/Music /home/nick/mnt/Music/
[nick@LT-NDG: ~/mnt]$ touch Music/something
touch: cannot touch `Music/something': Permission denied


After some testing and googling I came to the conclusion that the problem lies with an incorrect UID and GUID.

Apparently, the share is mounted as 'oracle:vboxuser' instead of 'nick:nick':
CODE
[nick@LT-NDG: ~/mnt]$ ls -la Music/
total 16
drwxr-xr-x 2 oracle vboxusers 4096 2008-08-31 17:15 ./
drwxr-xr-x 4 nick   nick      4096 2008-08-31 13:49 ../
-rw-r--r-- 1 oracle vboxusers   47 2007-10-13 17:45 .directory
lrwxrwxrwx 1 oracle vboxusers   14 2008-08-31 17:15 mp3 -> /home/nick/mp3


And indeed, on hal9000:
CODE
[root@HAL9000 ~]# id nick
uid=501(nick) gid=501(nick) groups=501(nick),502(vboxusers)
and on the client:
CODE
[nick@LT-NDG: ~/mnt]$ id nick
uid=500(nick) gid=500(nick) groups=500(nick),6(disk),14(uucp),501(vboxusers)


While googling I found a solution using the 'static_map=' switch but that doesn't seem to work on MDV2008.1.

What is the best way to fix this?



(edit: submitted prematurely and have now completed the post)
tyme
add the NFS share to /etc/fstab and set your UID and GUID in there. be sure to use the noauto option, so it doesn't try to mount it on boot (before the network is up).
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-2008 Invision Power Services, Inc.