1828047 Members
1572 Online
109973 Solutions
New Discussion

NFS Export

 
abcd7
Frequent Advisor

NFS Export


Hi,

I have exported a file system over NFS. The '/etc/exports' reads like this.



I could mount this and read the contents on any of my HP UNIX systems. I presumed that since I didn't specify any option, it should be exported with RW permissions to eveyone. It was not the case so. Even a root user from other systems couldn't touch a file in this exported FS. Can anyone tell me why was it so ?

I then added this entry in the 'exports' file

-anon=

This didn't work either.

Finally, I changed it like this.


-rw root=

It worked.

Questions for you.

1) Why was I unable to write to this directory in the first 2 cases ?

2) The UID which owns this file system does not exist on the NFS client systems. Then I reasoned that, if I made an '-anon=UID' entry, it will give owner permissions to it all. Even this didn't work . Why so ?

3) Can any user mount NFS file systems ?

T&R

Doug
3 REPLIES 3
Dennis Handly
Acclaimed Contributor

Re: NFS Export

>

(You mean directory. No folders on UNIX ;-)

>it should be exported with RW permissions to eveyone.

That's RW to users that fit the normal file permissions of User Group Other or ACLs.

>Even a root user from other systems couldn't touch a file in this exported FS.

A root user over NFS has even less permissions than a normal user. They are normally treated as the user "nobody". To fix this, you need root= as you found out.

>2) The UID which owns this file system does not exist on the NFS client systems.

Then you need to have the permissions under Other to allow it.

>3) Can any user mount NFS file systems?

Only root can mount it. You may be able to allow SAM to give this permission to other users.

If you meant can any system mount it, you can restrict it by listing machine names in /etc/exports
Peter Nikitka
Honored Contributor

Re: NFS Export

Hi,

> 3) Can any user mount NFS file systems ?

Having setup automount, any command trying to access soemthing of this NFS-export will trigger the automount-process (which is running with UID root) to mount this filesystem.
After an inactivity timeout it gets umounted.

See 'man automount'.

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
abcd7
Frequent Advisor

Re: NFS Export



Many Tanks for your replies.