Thanks to all of you. My current scenario is like this. I have an app running as "root" on server. I can not change this. I have a similar app running under user space on client. They share all data files via NFS
From the client if I log in as root then cd to the NFS mount I can then read/write as root on the shared NFS mount (server confirms files as owner root). If however I log in as user on the client, I no longer can read/write as root. Instead it seems to map to the user of the corresponding user ID (number) .
I want to be able to log in to the client as user and maintain the ability to read/write the NFS share as root
current export is like this
I mount it on the client like this
192.168.1.2:/home/serverusername /home/clientusername nfs _netdev,defaults,user,auto,noatime,intr 0 0
so if I change the export as follows
Then how do I define to squash all access to "root"?
I can not change how the server writyes these files. They will always be root:root
although the smb suggestion is good, I thought about it already and unfortunately I do not really see it as a viable option for performance reasons.