Due to issue from idmapping, NFS customization on Synology is given up. I will directly use Synology's official NAS setting in WebGUI. And set all visitor either as admin or guest
Used one day trying to solve the problem that I cannot write to `/volume1/homes/Jason`, found the problem is from my side. When I created `/mnt/synology_homes_Jason`, I didn't make it `chmod 777`. BAGA!
Anyway, [Applying Default UNIX Permissions](https://www.synology.com/en-us/knowledgebase/DSM/help/FileStation/settings) and [How to manage ACL settings on your Synology NAS](https://www.synology.com/en-global/knowledgebase/DSM/tutorial/File_Sharing/How_to_manage_ACL_settings_on_your_Synology_NAS) are good references
* Didn't give NFS R/W access to `/homes/Jason` in Synology WebGUI, it can be easily solved.
* (Just discovered) Permission of `homes/Jason`, as I frequently ssh to my account, my `/homes/Jason` is set at 755 (drwxr-xr-x), which forbidden writing to this directory using non-Jason account. If I gave access for admin to write to my home directory, I cannot ssh in. So ssh and nfs to my homedirectory is not compatible.
Solution: Create a `nfs` shared folder in Synology to be mounted on my ubuntu
Synology's DSM WebGUI has capability to set NFS configuration to allow Linux to access files on Synology NAS, follow [tutorial: How to access files on Synology NAS within the local network (NFS)](https://www.synology.com/en-us/knowledgebase/DSM/tutorial/File_Sharing/How_to_access_files_on_Synology_NAS_within_the_local_network_NFS)
But the GUI's feature is limited. We need more fine tuning. Following [NFS: Overview and Gotchas](http://www.troubleshooters.com/linux/nfs.htm), we can set Synology properly. (If the URL is broken, we can refer to [NFS: Overview and Gotchas in repo](/source/NFS_Overview/NFS\ Overview\ and\ Gotchas.htm)
* User ID Mapping options (need to be mentioned here)
We want to make directories accessible as if the incoming request was from that user or that group, which is done by combining `all_squash` option with `anonuid` and `anongid` options.
## 1. Current solution for mapping Synology NFS to Ubuntu (desktop or laptop)
Due to limitation of NFS4.0, idmapping is too hard (mismatch between server and client's uid/gid) to configure at server side, and kerberos authentication is too hard to setup.
1. Follow Synology official guide + youtube to set NFS permission
1. add ip address of Proxmox only, no need to add ip address of the LXC within it)
2. Choose squash as "map all user to admin"
2. Mount NFS to Proxmox by go to Datacenter->Storage->Add->NFS, choose different content types.
3. Modify LXC config file after creation of LXC to add mounting point
1. Following [Bind Mount Points](https://pve.proxmox.com/wiki/Linux_Container#_bind_mount_points) to setup bind mount point in config file (in `/etc/pve/lxc`)
* [How to manage ACL settings on your Synology NAS](https://www.synology.com/en-global/knowledgebase/DSM/tutorial/File_Sharing/How_to_manage_ACL_settings_on_your_Synology_NAS)