Solved How to mount synology drive from FreeBSD?

I assume maybe those who use synology can kick in and help, if there are such people here.
here is what I do:

echo 'nfs_client_enable="YES"' >> /etc/rc.conf
service nfsclient start
mount -v /mnt/download

and it gives me error: permission denied.

in the synology control panel I did enable the NFS sharing, nfs permissions set to R/W, No mapping. the host has IP of the FreeBSD machine.

I am stuck and out of ideas...searching for similar threads for linux does not bring any results either... can someone give any hint?
Here is the relevant part of my /etc/rc.conf:
nfs_server_flags="-t -u -n 8"
Works here for several years.
i modified the /etc/rc.conf as aragats has it, same thing, this is output I get:
mount_nfs: nmount: /mnt/download: Permission denied

and yes of course I did create /mnt/download before that
Here is mine.
NFS Server:
### NFS Server ###

/files -maproot=root -network

#### NFS Client ####
nfs_client_flags="-n 4"
what is /etc/export? is it a file which I must create with line below:
/files -maproot=root -network ?

also what is that "/16" after IP?
It is subnet mask that allows all connections from 192.168.x.x.
Normally you only need -network
You absolutely need an /etc/exports file. Don't just borrow mine it is for example.
Learn what it does. Mine is very unsecure.

First off mount -v don't cut it. You need a filesystem 'type' with -t nfs.
Better yet use mount_nfs

My fileserver is at
showmount -e
Exports list on

mount -t nfs /mnt
mount_nfs /mnt
so I still didn't get between /16 and /24
could you give me a hint with full command using mount_nfs?

and a full line I need to have in /etc/exports? (its exports not export, correct?)
btw this:
showmount -e

actually shows me proper mount and my IP of current freebsd machine! its just...cant get over permission problem
The slash /16 or /24 is the subnet mask. Use /24 if unsure.

I am using as my example. Please use your NFS server IP address instead.
Phishfry, can you tell me what special settings have you applied to synology folder on synology control panel?
again.. because in my case, showmount -e does show proper mount target location (on synology) as well as my current IP on right side... its just I am not sure what is wrong with permission
Typo indeed. /etc/exports is needed on FreeBSD NFS server.
I can't help you on Synology. I always build my own fileservers.
/etc/exports is not needed on your NFS client.
Did you use my /etc/rc.conf settings for NFS Client and reboot?
Did you use my /etc/rc.conf settings for NFS Client?

so, if "showmount -e <ip_of_synology_nas> returns me subfolder directory for that NAS and with the IP of current machine which I entered there (I entered in synology settings the IP of the machine from which I wanna access it) then it means that the link is I guess its some screwing around with permissions on synology thing required... so.. I'd appreciate if any synology user can give additional hint
You might need to consider what OS the synology is using (Linux?) and adjust your settings until working.
The FreeBSD RPC settings may be unneeded.

ok, I do have same page there where the tick mark is on "Enable NFSV4 support" (just v4 not v4.1) as you have.

but what syntax I must change then? syntax in mounting command?
mount_nfs -o nfsv4 <ip>:/volume1/DOWNLOAD /mnt/download
again yields:
mount_nfs: nmount: /mnt/download: Permission denied
nfs just didn't work for me.
anyway, I managed to mount it via SMB the following way:

add this to "/etc/fstab":
//myusername@servername/download /mnt/download smbfs rw,-N,-I<IP> 0 0

then make sure these lines uncommented in /etc/nsmb.conf


so now every reboot I see folder mounted and I can view files...

however, I can only write to that /mnt/download folder as root, but not as user... what am I missing and how to solve it? I already did:
chown -R regularuser /mnt/download

that doesnt solve it
You don't need -N and -I options in /etc/fstab since you already have your settings in /etc/nsmb.conf.
Instead, pass your local user's name or UID with -u option:
//myusername@servername/download /mnt/download smbfs rw,-u=mylocaluser 0 0
indeed it worked. removed -N-I settings and added -u=mylocaluser,

now after reboot it mounts, and I can R/W with regular user as well.

so..seems like NFS is kinda picky or cumbersome to setup, at least in my case... with SMB it was rather simple because instead of showing IP of client in host side and rely on UID match etc.. all had to do is create username on SYnology, and with that username/pass login from FreeBSD machine.

anyway, solved
I believe this only works if the Shared Folder in Synology is not encrypted. If it is encrypted, the "NFS Permissions" tab will be greyed out in DSM. This is the problem I'm facing. SSHFS or SMB is probably going to be my solution, if I can get one of them working properly.