how to change permission of file/folder from container for NFS file server
Sometime we may need to change permission of a folder or file from container startup script. For example - docker.io/postgres:9.6.5 in kubernetes container startup script want change file permission and when you are using NFS file server, the operation may fail. Becasue its like root act as on local directory for NFS directory. So by default its off in NFS server. If you really the feature then you can enable by following step -
Set NFS export dir:
"nfs/main *(rw,sync,no_subtree_check,no_root_squash)"
And then restart NFS server:
sudo /etc/init.d/nfs-kernel-server restart
or
sudo exportfs -arv