Operating System - HP-UX
1823943 Members
3294 Online
109667 Solutions
New Discussion юеВ

change file permission on nfs mount point

 
blu.karthi
Advisor

change file permission on nfs mount point

i have exported /abc folder on ux1server and mount on ux2 server on the mount point /xyz. now i want to change the permission of file in /xyz (nfs mount point).
12 REPLIES 12
SoorajCleris
Honored Contributor

Re: change file permission on nfs mount point

Hi,

With which permission you have exported and which permission you need to set?

Is there any restriction for the user?

From which Machine you would like to change it?

The maximun you can have is the exported permission.

Regards,
Sooraj
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
Roopesh Francis_1
Trusted Contributor

Re: change file permission on nfs mount point

if you have write permission for the nfs mount,you can change it.

otherwise change the permission in nfs server and export it to client.

Thanks
Vijaykumar_1
Valued Contributor

Re: change file permission on nfs mount point

Hi Karthi,

Keept it simple..

Do you have root access on the UX1 server ?If yes try changing the permissions..

If you are not able to do so , pls check the bdf o/p or /etc/mnttab and post here..
Hakki Aydin Ucar
Honored Contributor

Re: change file permission on nfs mount point

You have to use /etc/fstab file in client side;

for example the following is for read write access; (ux1 server must be nfs server)

ux1:/nfs/xyz /nfs/xyz nfs rw,suid 0 0
Hakki Aydin Ucar
Honored Contributor

Re: change file permission on nfs mount point

of course before that you have to export in file /etc/exp, and check it out that :

ux1# showmount -e
export list for ux1:

/var/opt/ignite/recovery/archives/user1 user1
/nfs/xyz (everyone)

xyz read write accessible for everyone or an user specified.

then issue the command:

exportfs ├в v /nfs/xyz
Hakki Aydin Ucar
Honored Contributor

Re: change file permission on nfs mount point

sorry for garbage chars:

then issue the command:

exportfs -├В ├В v /nfs/xyz
Dennis Handly
Acclaimed Contributor

Re: change file permission on nfs mount point

>Hakki: you have to export in file /etc/exp

That's /etc/exports. And what is already exported is in /etc/xtab.
Hakki Aydin Ucar
Honored Contributor

Re: change file permission on nfs mount point

Thanks Dennis, I don t know what is going on ; my typo s here . .
Viktor Balogh
Honored Contributor

Re: change file permission on nfs mount point

The root rights are not coming as a default with an NFS share. this means, the root@ux1 will be mapped to nobody@ux2 (nobody's UID is -2 per default.)

To keep the root permissions on the remote server you could use the following with the exportfs command:

# exportfs -o root=hostname1[:hostname2]... /share

see man 1m exportfs
and man 4 exports (for setting exports permanently)
****
Unix operates with beer.
Viktor Balogh
Honored Contributor

Re: change file permission on nfs mount point

the previous "root" option is not safe, perhaps you should just "su" to another user on ux2 and this way you can chmod the required files. (a normal user is only allowed to set the permissions of his/her own files)
****
Unix operates with beer.
blu.karthi
Advisor

Re: change file permission on nfs mount point

I am loging in as root only on ux2. on ux1 is exported as

on ux1
#cat /etc/exports
/foldername -anon=65534,async

on ux2
when i am using the command on nfsmounted folder. iam geting error
#chown 777 /nfsmount
chmod: can't change nfsmount: Not owner

Dennis Handly
Acclaimed Contributor

Re: change file permission on nfs mount point

>I am logging in as root only on ux2. On ux1 is exported as: /dirname -anon=65534,async

As Viktor said, you have exported /nfsmount with the "root is less than dirt" option.

root can't do anything at all on that filesystem unless you allow everyone (other) to write, or initially root (as dirt), created the files and directories.

Of course root can do "su" to the owner of every file on that filesystem.