Subject: NFS
To: None <netbsd-help@NetBSD.ORG>
From: John R. Daily <jdaily@bbn.com>
List: netbsd-help
Date: 06/09/1997 19:11:45
Running into some odd behavior, and rapidly becoming frustrated
by my attempts to track down the cause of the problem.

We're running NetBSD 1.2 on the Sparc architecture, and I'm
attempting to NFS mount directories and allow them to be
modified by root on the client machines.

Here is the entry from /etc/exports on the server end:
/usr -maproot=root

(I've also had the -alldirs argument present, with no
difference in behavior. I removed a netgroup argument
to narrow possible points of failure)

And /etc/fstab on the client:
<server>:/usr/local /usr/local nfs rw,soft,intr,bg,auto 0 0

I can successfully mount /usr/local, and if user-owned
directories exist, I can create and modify files within
those directories.

However, as root on the client, I cannot create new files
under /usr/local. I was under the impression this was the
point of the -maproot argument.

The end result is always "permission denied"; more on this
later.

If I'm overlooking some obvious configuration problem,
feel free to ignore the remainder of this message.

Unfortunately, I've been unable to get any information out
of ktrace on the nfsds running on the server; I read
somewhere that nfsd is simply a non-returning system call
to the kernel, which may explain why.

When running snoop under Solaris, I get what may be the
reason for the failure. Here is the output:

RPC:  RPC version = 2
RPC:  Program = 100003 (NFS), version = 3, procedure = 8
RPC:  Credentials: Flavor = 1 (Unix), len = 48 bytes
RPC:     Time = 0
RPC:     Hostname =
RPC:     Uid = 0, Gid = 0
RPC:     Groups = 0 2 3 4 5 20 31
RPC:  Verifier   : Flavor = 0 (None), len = 0 bytes
RPC:
NFS:  ----- Sun NFS -----
NFS:
NFS:  Proc = 8 (Create file)
NFS:  File handle = 000007070000078B000C00000001FA40
NFS:                3376B22E0000000000000000
NFS:  File name = foo
NFS:  Method = Unchecked
NFS:    Mode = 0644
NFS:     Setuid = 0, Setgid = 0, Sticky = 0
NFS:     Owner's permissions = rw-
NFS:     Group's permissions = r--
NFS:     Other's permissions = r--
NFS:  User ID = (not set)
NFS:  Group ID = (not set)

Note that while in the RPC header, the UID is specified,
under the NFS header, it is not. Perhaps this is irrelevant.

Here's the corresponding NFS data returned by the server
after this request:

NFS:  Proc = 8 (Create file)
NFS:  Status = 13 (Permission denied)

Any help provided would be greatly appreciated.

-- 
John R. Daily
jdaily@bbn.com