Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Jul 2005 16:35:51 +0200
From:      "Norbert Koch" <>
To:        "Sergey Matveychuk" <>
Subject:   RE: /etc/exports - a strange restriction
Message-ID:  <000001c58e01$7e7908e0$4801a8c0@ws-ew-3.W2KDEMIG>
In-Reply-To: <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
> Norbert Koch wrote:
> >>/usr/tinderbox -ro -alldirs -maproot=0:0 localhost
> >>
> > As far as I know, it is a restriction of the nfs specification.
> > If you only want to export a single directory, you could e.g.
> > use mount_null/mount_nullfs(8).
> Well, in my example remote host is localhost. But if I need to share
> files on a network?

I think I don't understand your problem here:

  /usr -ro -alldirs -maproot=0:0 -network -mask
for an export into the local network

  /usr -ro -alldirs -maproot=0:0
for an export to a specific host.

> I've made a quick look at RFC1813 but could not find this restriction.
> But why this restriction anyway for? It's very unconvenient.

I am no nfs expert. May be it is not a specification restriction
but an implementation restriction. But all references I found about
/etc/exports always speak about exporting a file system, not a directory.
And that seems to be so for other operating systems too.

So if I understand you right, this may work (for FreeBSD 5.x):
  # mkdir /tinderbox
  # mount_nullfs /usr/tinderbox /tinderbox
  # echo '/tinderbox -ro -alldirs -maproot=0:0 any_local_or_remote_host' >

An other way to export /usr/tinderbox and all sub-directories is to specify
_all_ of them
in /etc/exports but w/o the -alldirs switch, e.g.:

  /usr/tinderbox /usr/tinderbox/dirA /usr/tinderbox/dirB -ro -maproot=0:0

See also the FreeBSD handbook chapter about nfs.


Want to link to this message? Use this URL: <$7e7908e0$4801a8c0>