Operating System - HP-UX
1832566 Members
5643 Online
110043 Solutions
New Discussion

Re: permissions on NFS mounted device

 
Angie Meeks
Occasional Advisor

permissions on NFS mounted device

We have an nfs mounted device. I am able to login as users oracle, applmgr and root and to create directories and files as those users.
We are now attempting to restore some files from our nightly backup.
The files were originally owed by the user oracle but the restore is setting the owner to 65534.
I logged in as root and attempted to do a chown on the files and it says
"not owner"
So i am unable to chaneg the owner of the files.
any suggestions?

thank you.
Angie
3 REPLIES 3
RAC_1
Honored Contributor

Re: permissions on NFS mounted device

That is because, the NFS is treating the user root as unknown user. How you have exported the FS?? Have you put options root=serverx when exporting the FS. serverx is where you are mounting it and restoring file.

Unless specified Root is alwars treated as unknown user.

You will have to export FS with root=serverx, access=serverx options.

Anil
There is no substitute to HARDWORK
A. Clay Stephenson
Acclaimed Contributor

Re: permissions on NFS mounted device

The UID you now see is actually nobody (-2 the two-complement of 65534). If you can login as root on the system that actually hosts the files then you can change the ownership. You will probably not be able to chaneg the owner to "oracle" because obviously that user is not defined on the host BUT you can change the ownership using oracle's UID rather than the user name.
If it ain't broke, I can fix that.
Sundar_7
Honored Contributor

Re: permissions on NFS mounted device

NFS by default will not map the NFS client root to the NFS server root. NFS client root is mapped to anon user that has the user ID of 65534.

also your NFS server doesnt seem to recognize the oracle user UID. Add the oracle user with the same UID to your NFS server.

I believe it is not good idea to restore the backup to a NFS mounted device. But still if you have to do it then logon to the NFS server and

1) Add oracle user to the NFS server with the same UID as in the NFS client
2) Add the following export options

# exportfs -iv -o root=nfsclient

Substitute nfsclient with your NFS client hostname.
Learn What to do ,How to do and more importantly When to do ?