From owner-freebsd-net@FreeBSD.ORG Sun Jun 14 18:20:34 2009 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58D441065676 for ; Sun, 14 Jun 2009 18:20:34 +0000 (UTC) (envelope-from prvs=1409b8d12a=brian@Awfulhak.org) Received: from idcmail-mo2no.shaw.ca (idcmail-mo2no.shaw.ca [64.59.134.9]) by mx1.freebsd.org (Postfix) with ESMTP id B15B98FC0A for ; Sun, 14 Jun 2009 18:20:32 +0000 (UTC) (envelope-from prvs=1409b8d12a=brian@Awfulhak.org) Received: from pd7ml2no-ssvc.prod.shaw.ca ([10.0.153.162]) by pd5mo1no-svcs.prod.shaw.ca with ESMTP; 14 Jun 2009 11:52:38 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.0 c=0 a=k78ZXbaa_ND9M4scsLIA:9 a=S5MntBbpyKNdlwdx6NChBOOLUzcA:4 a=WJ3hkfHDukgA:10 a=SV7veod9ZcQA:10 Received: from unknown (HELO store.lan.Awfulhak.org) ([174.7.23.140]) by pd7ml2no-dmz.prod.shaw.ca with ESMTP; 14 Jun 2009 11:52:38 -0600 Received: from store.lan.Awfulhak.org (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id 45F5FC433AC_A353908B; Sun, 14 Jun 2009 17:53:12 +0000 (GMT) Received: from gw.Awfulhak.org (gw.lan.Awfulhak.org [172.16.0.1]) by store.lan.Awfulhak.org (Sophos Email Appliance) with ESMTP id A61A6C460FC_A3538FBF; Sun, 14 Jun 2009 17:52:59 +0000 (GMT) Received: from dev.lan.Awfulhak.org (brian@dev.lan.Awfulhak.org [172.16.0.5]) by gw.Awfulhak.org (8.14.3/8.14.3) with ESMTP id n5EHqNNr002957; Sun, 14 Jun 2009 10:52:24 -0700 (PDT) (envelope-from brian@Awfulhak.org) Date: Sun, 14 Jun 2009 10:52:23 -0700 From: Brian Somers To: "marco\.borsatino\@poste\.it" Message-ID: <20090614105223.4f859708@dev.lan.Awfulhak.org> In-Reply-To: References: X-Mailer: Claws Mail 3.7.1 (GTK+ 2.16.2; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-net@freebsd.org Subject: Re: NFS - exports syntax X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2009 18:20:35 -0000 On Sun, 14 Jun 2009 10:29:21 +0200 "marco\.borsatino\@poste\.it" wrote: > Hi to all. > My problem concerns NFS configuration. I'm trying to simulate a little ne= twork using Sun VirtualBox in a Windows host and most of operations work fi= ne, but I've some problems with /etc/exports syntax. > This is my current exports file: > -- > /cond1 /cond2 -mapall=3Duser1 pc01 pc02 > /usr/home -alldirs pc01 pc02 > --- > When I type: > #showmount -e > I get > /usr/home=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 pc02 pc02 > /cond1=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 pc01 pc02 > /cond2=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 pc01 pc02 > which is ok. But I wold like to use different "mapall" options for differ= ent filesystems; for example, something like this: > /usr/home -alldirs=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 pc02 pc02 > /cond1 -mapall=3Duser2 /cond2 -mapall=3Duser1 pc01 pc02 > which does not work: only /usr/home is exported. Or > /usr/home=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 pc02 pc02 > /cond1 -mapall=3Duser2 pc01 pc02 > /cond2 -mapall=3Duser1 pc01 pc02 > Only /usr/home and /cond1 are exported. > FreeBSD exports man page states: > "Each line in the file (other than comment lines that begin with a #) spe= cifies the mount point(s) and export flags within one local server file sys= tem for one or more hosts.". So, is it impossible to export different direc= tories to different users using mapping? > Thanks. Sorry for my bad english. > Marco FreeBSD's exports implementation will only allow you to associate mount options per local filesystem per remote machine, so this version: > /usr/home=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 pc02 pc02 > /cond1 -mapall=3Duser2 pc01 pc02 > /cond2 -mapall=3Duser1 pc01 pc02 is correct, but only if /cond1 and /cond2 are different filesystems. If they're the same, this won't work. Maybe you do something clever with exporting nullfs versions of them and adding those to exports, but I haven't tried that. --=20 Brian Somers Don't _EVER_ lose your sense of humour !