Operating System - HP-UX
1855472 Members
3382 Online
104111 Solutions
New Discussion

Re: NFS export as readonly

 
SOLVED
Go to solution
Jerome D'silva
Advisor

NFS export as readonly

Host A has exported the files system as r/w to Host B .That means except Host B, all the other hosts have readonly access to this file system .
Can you let me know how we can prevent other than Host B from accessing this file system
5 REPLIES 5
Pete Randall
Outstanding Contributor
Solution

Re: NFS export as readonly

How about the access= option of export? See man exportfs.

Pete

Pete
Chuck J
Valued Contributor

Re: NFS export as readonly

On HostA:

vi /etc/exports

and add your line in:
/dir ???root=HostB

save that and now run:

[HostA:/]# /usr/sbin/exportfs ???av

ChuckJ
Ravi_8
Honored Contributor

Re: NFS export as readonly

Hi,

In /etc/exports file of host A

/ -rw=hostB

this prevents other hosts from accessing the file syetm
never give up
Robert-Jan Goossens
Honored Contributor

Re: NFS export as readonly

Hi,

On server add

#vi /etc/exports

/tmp -anon=65534,ro

#exportfs -a

On client

#mount servername:/tmp /mnt

#cd /mnt

#bdf .

servername:/tmp 255253 9045 220682 4% /mnt

#touch file
touch: file cannot create

Regards,

Robert-Jan.
Jerome D'silva
Advisor

Re: NFS export as readonly

Hi
Thanks for all the suggestions . It is working now .The /etc/exports looks like this

/home -rw=HostB,access=HostB

This would allow only the HostB to mount and rw the file system .If we need ro for another host we can add this to the access list as well

Thanks
Jerome