Operating System - HP-UX
1833452 Members
3364 Online
110052 Solutions
New Discussion

Re: NFS exports directory.

 
SOLVED
Go to solution
Belinda Dermody
Super Advisor

NFS exports directory.

Situation,
1. Have exports file on production.
/usr/ud/HARRIS
in /etc/exports /usr/ud/HARRIS -ro
/usr/ud/HARRIS/GMAX

/usr/ud/HARRIS is needed to -ro to the world
but /usr/ud/HARRIS/GMAX needs to default to -rw to only one system.

When I do a exportfs -a the following msg shows up as
exportfs error: /usr/ud/HARRIS/GMAX: parent-directory (/usr/ud/HARRIS) already e
xported

And the people on the development system can get to the GMAX directory but only can read and can not write to it. If I export /usr/ud/HARRIS as default rw, GMAX is writable but also the HARRIS directory which has productin files that could be overwritten or removed and this is definitely a NO NO. I am just using the stand NFS mount not autofs
5 REPLIES 5
Ian Dennison_1
Honored Contributor

Re: NFS exports directory.

This is probably a directory permissions issue.

If the parent directory is read only, the child directory should not be read-write.

Methinks your directory standard should be reversed - write directories at the top, read-only directories either separate or further down the directory structure.

Share and Enjoy! Ian
Building a dumber user
T G Manikandan
Honored Contributor
Solution

Re: NFS exports directory.

You have exported the parent dir as ro and the child dir as rw.

That is not possible.
When you mount the parent dir as read only the child dir still has the same permissions.
i think what you can do is
mount /usr/ud/HARRIS/GMAX into a different mount point on the NFS server and export it read write.

check and revert
Belinda Dermody
Super Advisor

Re: NFS exports directory.

Ian, thanks for the comments. But on the PRODUCTION side of the house, /usr/ud/HARRIS is r/w for all production users and so is GMAX, but I have to export /usr/ud/HARRIS -ro to the developement systems and the reporting systems. The managers only want the GMAX subdirectory availabe for the required system as -rw so they can move files around within the GMAX directory after processing.
Helen French
Honored Contributor

Re: NFS exports directory.

Not sure if this helps, but did you try reversing the order in which it appears on /etc/exports ?
Life is a promise, fulfill it!
Sridhar Bhaskarla
Honored Contributor

Re: NFS exports directory.

Hi,

Have a look at exports man page.

//
rw=hostname[:hostname]...
Export the directory read-mostly. Read-mostly means
read-only to most machines, but read-write to those
specified. If neither ro nor rw is specified, the
directory is exported read-write to all. The ro and rw
options cannot be used on the same exports line.
//

Now once you export your /usr/ud/harris directory as rw to only those systems that need read-write access. The rest by default will get read-only access. For ex., if you have servers servera, serverb and serverc. If your exports file on servera is like

/your_dir -rw=serverb

You can still mount /your_dir on serverc but is going to be only read-only. On serverb, you will have read-write access on this mount point.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try