Allow Connection to NAS
First, you need to add IP address in NFS Privileges list in [Control Panel] → [File Sharing and Privileges] → [Shared Folder] and allow for read / write. You may use IP with Netmask to specific range with the same permission. Thanks for correction by Li-chih Wu in Facebook Group: QNAP Geek.
For example, if you want all IP between 192.168.1.1 to 192.168.1.254 with the same permission, use 192.168.1.1/24. Another is all IP between 192.168.1.5 to 192.168.1.6 with the same permission, use 192.168.1.5/29. Netmask on Computer Hope is a very detail explain and IP Calculator by Krischan Jodies may calculate for you.
You also need to enable [Allow connections from non-priviledged ports (ports higher than 1024)] for OS X.
drwxr-xr-x 2 1000 users 4096 Nov 14 10:33 Linux drwxr-xr-x 13 501 20 4096 Nov 14 10:30 Mac
File Permission and Squash Option
Because I want to have full access on files and folders on Synology, I have to edit /etc/exports and change no_root_squash into all_squash.
Use exportfs -ra to reload export configuration or use /usr/syno/etc/rc.d/S83nfsd.sh restart to restart NFS service. Please refer to Fix NFS privileges on Synology NAS on Linux and Unit tips and Basic commands to get around the Synology Box using the CLI: nfs on Synology for more detail.
In export, anonuid=1025 will be map as guest while anonuid=1024 is admin.
drwxr-xr-x 2 admin users 4096 Nov 14 19:15 Linux drwxr-xr-x 2 admin users 4096 Nov 14 19:20 Mac
Stop Generating @eaDir
When I am copying files, it seems @eaDir will stop from copying due to permission as discussed in eaDir directories causing problems on Synology forum. Therefore, I follow Getting rid of the @eaDir folders on Synology NAS DSM on MikeBeach.org to delete them all.
find . -name "@eaDir" -type d -print0 | xargs -0 rm -rf
Because I don’t need its Media Indexing Services, I also follow Disable indexing and generation of @eaDir directories on Synology NAS on MikeBeach.org to disable it.
cd /usr/syno/etc.defaults/rc.d/ chmod 000 S66fileindexd.sh S66synoindexd.sh S77synomkthumbd.sh S88synomkflvd.sh S99iTunes.sh
This post only apply to DSM on Synology. QTS on QNAP is even easier. Please refer to Using NFS to Share Files on QNAP Between OS X and Linux. If you are using OS X as your NFS server, please refer to EXPORTS(5) on OS X Man Pages.
- About.com: Linux / Unix Command: exports
- Apple: OS X Man Pages: EXPORTS(5)
- Apple: OS X
- Christian Schneider: HOWTO setup a small server: NFS Server (Network File System)
- Computer Hope: Netmask
- Facebook: QNAP Geek
- Krischan Jodies: IP Calculator
- Linux and Unix tips: Fix NFS privileges on Synology NAS
- MikeBeach.org: Disable indexing and generation of @eaDir directories on Synology NAS
- MikeBeach.org: Getting rid of the @eaDir folders on Synology NAS DSM
- nfs.sourceforge.net: 3. Setting Up an NFS Server
- QNAP: QTS
- StackExchange: Unix & Linux: How to configure a fixed user ID on an NFS server?
- Synology: DiskStation Manager
- Synology: Basic commands to get around the Synology Box using the CLI: nfs
- Tech Republic: Mounting NFS volumes in OS X
- Synology: Forum: eaDir directories causing problems
- Using NFS to Share Files on QNAP Between OS X and Linux
- Wiki: Internet Protocol
- Wiki: Lightweight Directory Access Protocol
- Wiki: Network File System
- You Mac / Linux Guy: Automount NFS in OS X
- 鳥哥的 Linux 私房菜： 第十三章、檔案伺服器之一：NFS 伺服器
- 鳥哥的 Linux 私房菜： 何為同一網段之 IP ，及 netmask 的定義與切割子網的方法說明