# Trouble setting up NFS



## RevennaFox (Sep 25, 2013)

Hello there. I'm having some problems setting up NFS. Both machines are running FreeBSD 9.1-RELEASE. The client's IP address is 176.16.0.40 and the server is 176.16.0.12, and I'm trying to export the directory /home/server/FILE_SHARE to all computers on my local network. Here's what I've done so far.
Added

```
rpcbind_enable="YES" 
nfs_server_enable="YES" 
mountd_flags="-r"
```
to the server's rc.conf

Added

```
nfs_client_enable="YES"
```
to the client's rc.conf

And added
	
	



```
/home/server/FILE_SHARE    -network 176.16 -mask 255.255.0.0
```
to the server's /etc/exports file

Trying to mount it produces this
	
	



```
root@REVEN:/root # mount 176.16.0.12:/home/server/FILE_SHARE /mnt
[tcp] 176.16.0.12:/home/server/FILE_SHARE: Permission denied
```


----------



## SirDice (Sep 25, 2013)

It's probably still mounted. NFS will try both TCP and UDP. Also, after you made changes to /etc/exports remember to send a SIGHUP to both nfsd and mountd. You can verify if it's exported correctly with `showmount -e <nfsserver>`.


----------



## RevennaFox (Sep 26, 2013)

Nope, definitely not mounted, mount just repeats the permission denied line over and over again without ever really exiting. /mnt on the client is empty, and running `showmount -e` on the server or client just results in the line 
	
	



```
Exports list on localhost:
```
If I run `showmount -e 176.16.0.12` from the client while mount is stuck in a loop repeating permission denied it just hangs. until you kill mount, and then it says this:

```
RPC: Port mapper failure
showmount: can't do exports rpc
```


----------



## SirDice (Sep 26, 2013)

RevennaFox said:
			
		

> /mnt on the client is empty, and running `showmount -e` on the server or client just results in the line
> 
> ```
> Exports list on localhost:
> ```



Then your /etc/exports isn't working. Also check with `rpcinfo <nfsserver>`. You should see rpcbind, mountd and nfs as registered services.


----------



## RevennaFox (Sep 27, 2013)

```
root@REVEN:/root # rpcinfo 176.16.0.12
   program version netid     address                service    owner
    100000    4    tcp       0.0.0.0.0.111          rpcbind    superuser
    100000    3    tcp       0.0.0.0.0.111          rpcbind    superuser
    100000    2    tcp       0.0.0.0.0.111          rpcbind    superuser
    100000    4    udp       0.0.0.0.0.111          rpcbind    superuser
    100000    3    udp       0.0.0.0.0.111          rpcbind    superuser
    100000    2    udp       0.0.0.0.0.111          rpcbind    superuser
    100000    4    tcp6      ::.0.111               rpcbind    superuser
    100000    3    tcp6      ::.0.111               rpcbind    superuser
    100000    4    udp6      ::.0.111               rpcbind    superuser
    100000    3    udp6      ::.0.111               rpcbind    superuser
    100000    4    local     /var/run/rpcbind.sock  rpcbind    superuser
    100000    3    local     /var/run/rpcbind.sock  rpcbind    superuser
    100000    2    local     /var/run/rpcbind.sock  rpcbind    superuser
    100005    1    udp6      ::.3.15                mountd     superuser
    100005    3    udp6      ::.3.15                mountd     superuser
    100005    1    tcp6      ::.3.15                mountd     superuser
    100005    3    tcp6      ::.3.15                mountd     superuser
    100005    1    udp       0.0.0.0.3.15           mountd     superuser
    100005    3    udp       0.0.0.0.3.15           mountd     superuser
    100005    1    tcp       0.0.0.0.3.15           mountd     superuser
    100005    3    tcp       0.0.0.0.3.15           mountd     superuser
    100003    2    udp       0.0.0.0.8.1            nfs        superuser
    100003    3    udp       0.0.0.0.8.1            nfs        superuser
    100003    2    udp6      ::.8.1                 nfs        superuser
    100003    3    udp6      ::.8.1                 nfs        superuser
    100003    2    tcp       0.0.0.0.8.1            nfs        superuser
    100003    3    tcp       0.0.0.0.8.1            nfs        superuser
    100003    2    tcp6      ::.8.1                 nfs        superuser
    100003    3    tcp6      ::.8.1                 nfs        superuser
```


----------



## SirDice (Sep 27, 2013)

Ok, everything seems to have registered fine. Perhaps there's an error in your /etc/exports that prevents it from loading. Are there any error messages in /var/log/messages?


----------

