Operating System - HP-UX
1832992 Members
2596 Online
110048 Solutions
New Discussion

Allowing rw access via NFS

 
SOLVED
Go to solution
Tom Brown
Advisor

Allowing rw access via NFS

I need to export a particular directory for read-write access. The client machines are not all in my DNS domain, but can mount NFS directories just fine. The other machines are a mixture of mainly Solaris systems.

I want the files they create on my server to be maintainable by users who are local on my server, so want to use the -anon=UID syntax. Try as I might, I cannot get a consistent ability for remote uses to write to my exported directory. With some syntax, root can write; with other syntax, ordinary users can write. Most of the time, nobody can write.

The second problem is that NFS on my local machine (HP-UX 11.0, L2000), when I can get the -anon = to work, sets the GID to the same number as the UID, regardless of whether the GID exists.

This seems to be a very buggy situation for what should be a very mature product (NFS).

Any patches, expertise, or suggestions out there?
It is better to be rich and healthy than poor and sick.
1 REPLY 1
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Allowing rw access via NFS

Hi Tom:

First thing: On the NFS server, do an exportfs -u /myfilesystem. Next let's unmount the filesystem itself. /umount /myfilesystem.
I now want you to examine the permissions of the mountpoint directory itself. If the mountpoint has very restrictive permissions that could be your problem.

chmod 755 /myfilesystem
chown root:bin /myfilesystem

Now remount your filesystem:
mount /myfilesystem (assuming it's in /etc/fstab)
cd /myfilesystem and do an ls -la and examine the permissions of the mounted filesystem.
Set them to whatever you like but since you are going to allow anonymous rw access, chmod 777 /myfilesystem would seem to be your desired mode.

Now examine your password file or passwd map if NIS and make sure that you have an entry for the anonymous NFS user 'nobody'.
nobody:*:-2:-2::/: (or something very close)

Now examine /etc/group and see that you have a 'nogroup' entry.
nogroup:*:-2:

Your /etc/exports file entry should be very simple:
/myfilesystem
or
/myfilesystem -anon=303,root=hostA:hostB:hostC

The 2nd entry would give all anonymous user, uid 303 which should be defined and allow HostA,hostB, and HostC root access to /myfilesystem. By default, exports are read-write.

Next, test your hostname resolution in both directions (client -> server, server -> clint) using ping.

Lastly, exportfs -a.


This should fix you, Clay

If it ain't broke, I can fix that.