# Mount NFS Read/Write



## tomdean (May 22, 2012)

I have two systems:


```
server 192.168.2.3 FreeBSD 9.0-Stable amd64
> cat /etc/exports
/usr/src -alldirs,quiet,ro -network 192.168.2.0 -mask 255.255.255.0
/home    -alldirs,quiet -network 192.168.2.0 -mask 255.255.255.0
```


```
client 192.168.2.20 FreeBSD 8.2 i386 (nanoBSD)
```

On the client, I can mount /home or /home/<user> but, the mount is read only.

```
# mount -v -w -t nfs 192.168.2.3:/usr/home/<user> /var/<user>
192.168.2.3:/usr/home/<user> on /var/<user> (nfs, fsid 08ff000202000000)

> echo "asdf" > /var/<user>/xx
/var/<user>/xx: Read-only file system.
```
user has the same uid and gid on both systems.

What am I doing wrong?

Tom Dean


----------



## SirDice (May 22, 2012)

Users normally don't have permission to write anywhere in /var/. Are the permissions set correctly?

Can you also show how it's mounted? Just enter the mount command without any parameters.

Also verify if it's exported correctly with `# showmount -e 192.168.2.3`


----------



## tomdean (May 22, 2012)

Recall from my initial post, the client is nanoBSD, diskless, so /var is a memdisk. The system disk is flash.

I found a funny - on the server, `/etc/rc.d/mountd reload` only processes the first line of /etc/exports. No errors reported.

```
> cat /etc/exports
/usr/home/tomdean -alldirs,quiet    -network 192.168.2 -mask 255.255.255.0
/usr/src          -alldirs,quiet,ro -network 192.168.2 -mask 255.255.255.0
/diskless/i386    -alldirs,quiet,ro -network 192.168.2 -mask 255.255.255.0
```
If I mess up /etc/exports, it gets logged in /var/messages.

On the client (nanoBSD):

```
> showmount -e 192.168.2.3
Exports list on 192.168.2.3:
/usr/home/tomdean                  192.168.2.0
```


----------

