Subject: Tearing out my hair over exports(5)
To: NetBSD Help <netbsd-help@netbsd.org>
From: B. James Phillippe <bryan-spamtrap0@darkforest.org>
List: netbsd-help
Date: 03/13/2002 10:20:24
Hello,

I'm having a lot of trouble figuring out how to set up NFS exports on my
server.  I have read the man page for exports about a dozen times, but
can't seem to get done what I want to get done.

Here is what I want:

/usr/home exported to 192.168.216.0/24, read-only, map all users to x:y
/usr/local/net exported to everyone, including 192.168.216.0/25,
  read-write, map all users to x:y

Here is what I've tried:

/usr/home -mapall=netuser:nogroup -ro -network 192.168.216.0/24
/usr/local/net -mapall=netuser:nogroup

.. which fails with:

Mar 13 10:01:24 jupiter mountd[131]: "/usr/local/net -mapall", line 2:
Can't change attributes for /usr/local/net to 192.168.216.0

.. so then I tried:

/usr/home -mapall=netuser:nogroup -ro -network 192.168.216.0/24
/usr/local/net -mapall=netuser:nogroup -network 192.168.216.0/24
/usr/local/net -mapall=netuser:nogroup

.. which fails with the same error.  In vain, I attempt:

/usr/home /usr/local/net -mapall=netuser:nogroup -ro -network 192.168.216.0/24
/usr/local/net -mapall=netuser:nogroup

.. which works without an error, but is of course exporting /usr/local/net
read-only to my internal network.

Last, I tried this:

/usr/home -mapall=netuser:nogroup -ro
/usr/local/net -mapall=netuser:guest -network 192.168.216.0/24

.. which also works without an error, but a.) makes /usr/home available to
anyone, which I really don't feel comfortable with, and; b.) I get
"permission denied" when trying to write to /usr/local/net when mounted
from a Linux machine, even though the mode of the directory is 2775 and it
is owned by the user I have set in the -mapall option, netuser:guest.

-bp
--
# bryan at darkforest dot org
# Software Engineer