NFS Linux / Synology NAS - Mapping uid/gid

To map a specific user with NFS exports:
  • Replace option no_root_squash by all_squash in /etc/exports
  • Specify anonuid=1023 and anongid=1023 (which are the uid and gid of the user on server side)
On a Synology NAS, web nfs sharing is owned by the user 'http' (uid 1023) and group 'http' (gid 1023).
Example for Synology, /etc/exports on server nas
/volume1/web    192.168.1.0/24(rw,async,no_wdelay,crossmnt,insecure,all_squash,insecure_locks,sec=sys,anonuid=1023,anongid=1023)