BSD12 NFS problem

Hello

I am using FreeBSD 12. I cannot access the NFS share. It gives permission error. But there is no problem with permission.

What could be the problem?

---% server:
Code:
# freebsd-version
12.1-RELEASE

# cat /etc/rc.conf

nfs_server_enable="YES"
nfs_server_flags="-u -t -n 4"
rpcbind_enable="YES"
mountd_flags="-r"
mountd_enable="YES"


# showmount -e

Exports list on localhost:
/nfsshare       10.151.77.10

---% Ubuntu client
Code:
mount -o vers=2  -t nfs -vvvv 10.151.77.10:/nfsshare   /mnt/nfs 

---% Error:
mount.nfs: timeout set for Sat Oct 17 14:36:06 2020
mount.nfs: trying text-based options 'vers=2,addr=10.151.77.10'
mount.nfs: prog 100003, trying vers=2, prot=6
mount.nfs: trying 10.151.77.10 prog 100003 vers 2 prot TCP port 2049
mount.nfs: prog 100005, trying vers=1, prot=17
mount.nfs: trying 10.151.77.10 prog 100005 vers 1 prot UDP port 797
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting 10.151.77.10:nfsshare
 
Last edited by a moderator:
Exports list on localhost:
/nfsshare 10.151.77.10
...

---% Ubuntu client
mount -o vers=2 -t nfs -vvvv 10.151.77.10:/nfsshare /mnt/nfs

Could it be you have set by mistake the FreeBSD NFS servers IP in /etc/exports instead of the Ubuntu clients? It should be:
/etc/exports
Code:
/nfsshare <Ubuntu client IP>

Ubuntu client
mount -o vers=2 -t nfs -vvvv <FreeBSD NFS server IP>:/nfsshare /mnt/nfs
 
Your client might not do NFSv4 which requires a bit more configuration of you want to use NFSv3 (like LibreELEC clients).
Here's a sample from a 12.1 box serving LibreELEC clients (NFS v3), read only and allows all clients on 192.168.22.0/24 to access

/etc/rc.conf
Code:
nfs_server_enable="YES"
nfsv4_server_enable="YES"
nfsuserd_enable="YES"

/etc/sysctl.conf
Code:
vfs.nfsd.server_min_nfsvers=3

/etc/exports
Code:
/zfsarray/Media/Video -ro -mapall=nobody -alldirs -network 192.168.22.0/24
 
Back
Top