Date: Thu, 21 Jul 2005 16:35:51 +0200 From: "Norbert Koch" <NKoch@demig.de> To: "Sergey Matveychuk" <sem@FreeBSD.org> Cc: questions@FreeBSD.org Subject: RE: /etc/exports - a strange restriction Message-ID: <000001c58e01$7e7908e0$4801a8c0@ws-ew-3.W2KDEMIG> In-Reply-To: <42DF9F80.8060705@FreeBSD.org>
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 192.168.0.0 -mask 255.255.0.0 for an export into the local network 192.168.0.0/16. /usr -ro -alldirs -maproot=0:0 192.168.1.2 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' > /etc/exports 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 any_host See also the FreeBSD handbook chapter about nfs. Norbert
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000001c58e01$7e7908e0$4801a8c0>