Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Dec 2009 16:41:30 +0200
From:      Richard Mace <macerl@telkomsa.net>
To:        freebsd-questions@freebsd.org
Subject:   Cannot write to nfsv4 share
Message-ID:  <200912111641.30987.macerl@telkomsa.net>

Next in thread | Raw E-Mail | Index | Archive | Help
I am running 8.0-RELEASE.

I am able to mount an nfsv4 share on a Debian GNU/Linux server, but I cannot 
write to it. I realise that nfsv4 is experimental on FreeBSD, but I am 
tantalisingly close to getting it working and thought that someone here could 
advise, or point me to some (web) reference. I have googled but have not found 
anything relevant to this problem.

I have enabled the following in /etc/rc.conf:

nfs_client_enable="YES"
nfsuserd_enable="YES"
nfsuserd_flags="-domain localdomain"
nfscbd_enable="YES"

I have passed the domain "localdomain" to nfsuserd via nfsuserd_flags because 
that is what it is set to (by default) via /etc/idmapd.conf on the Linux 
server.

I mount the remote location using:

# mount -t nfs -o nfsv4,rw 192.168.x.x:/freeagent /mnt

which succeeds.... (either with or without the "rw" option)

# mount
/dev/ad2s1a on / (ufs, local)
devfs on /dev (devfs, local, multilabel)
/dev/ad2s1e on /tmp (ufs, local, soft-updates)
/dev/ad2s1f on /usr (ufs, local, soft-updates)
/dev/ad2s1d on /var (ufs, local, soft-updates)
192.168.x.x:/freeagent on /mnt (newnfs)

When I execute an ls -al on /mnt all the directories have the correct 
permissions, except for one.... (NOTE THE GROUP -- 32767)

drwx------    2 root   32767   16384 Jul  5 12:28 lost+found

If I try, either as root, or as my regular user account, to write to the drive 
I get

$ cd /mnt
$ touch junk
touch: junk: Permission denied

I have checked the directory permissions for my user and they are correct. I 
use the same username (and group) on both the FreeBSD desktop and the Linux 
(NFS4) server and, according to the permissions, I own and should be able to 
write to the share:

$ cd /mnt
$ ls -ald .
drwxr-xr-x  7 username  username  4096 Dec 11 13:37 .

I can successfully read from the nfs4 mounted drive, but I cannot write to it. 
Has anyone got any idea where I have gone wrong. (If I boot to Linux on the 
same client I can successfully mount and read/write, so I'm reasonably certain 
the server side is set up correctly.)

-Richard










Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?200912111641.30987.macerl>