File Ownership problems when NFS Share/Mount a drive
Hi all,
I am new to solaris. I'm facing file ownership problems when NFS Share/Mount a drive.
Please read the scenario below for more details
I have two solaris boxes which have solaris9 installed on both.
I have NFS shared and mounted a file system as follows
Host1
Shared a folder /sharedFromHost1 from host1 to host2 with the following command in dfstab file
share -F nfs -o ro,rw=host2,root=host2 /sharedFromHost1
Host2
Created mount point /mountToShare in host2, then Mounted the shared drive from host1 with the following command
mount host1:/sharedFromHost1 /mountToShare
If I create any file under /sharedFromHost1 from host1, it's getting reflected in host2's /mountToShare directory. And the same is working fine when created a file from the otherside also.
But the problem is with the users and user ownership to the files created in the hosts.
We have a user/group 'user1/group1' created on both the hosts. So that we can change(su) to the user user1 and can create files. Then that file should be owned by user1(user)/user1(group).
The issue here is, as 'user1'
when we create a file in /sharedFromHost1 from host1, and if we see the same file in /mountToShare directory from host2, the ownership of the file is shown as 2001(user)/606(group) instead of user1(user)/user1(group)
Also when we create a file in /mountToShare from host2, and if we see the same file in /sharedFromHost1 directory from host1, the ownership of the file is shown as 103(user)/sssteam(group) instead of user1(user)/user1(group)
But strictly we want to see the user/group as user1/user1 for all the files created by user1.
Did anyone of you gone through similar kind of situation or anybody who knows the solution? It would be great if you can help me regarding this.
Please let me know if you need any more details about the scenario
Thanks in advance

