X-Spam-Check-By: sourceware.org
Subject: RE: Problems with NFS server
From: Sam Robb <sam.robb@timesys.com>
To: Nicolas Boudin <N.Boudin@neopost.com>
Cc: cygwin@cygwin.com
In-Reply-To: <0F788535AE8C7D4CB24CADB2A1BA8AF41B1FDA@server25.nibv.neopost.com>
References: 	 <0F788535AE8C7D4CB24CADB2A1BA8AF41B1FDA@server25.nibv.neopost.com>
Content-Type: text/plain
Date: Fri, 16 Jun 2006 12:32:43 -0400
Message-Id: <1150475563.19756.11.camel@localhost.localdomain>
Mime-Version: 1.0
X-Mailer: Evolution 2.2.3 (2.2.3-4.fc4)
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

> > On Thu, 2006-06-15 at 15:36 +0200, Nicolas Boudin wrote:
> > > Hello,
> > > 
> > > I am trying to export via NFS a cygwin directory as a root 
> > > filesystem for an embedded Linux system (I hope it can work..)
> > 
> > It should - that's the whole reason I ported it for cygwin in 
> > the first place :-)
> 
> This is encouraging. :)
> 
> > Could you post your /etc/exports file, please?
> 
> I gave the only uncommented line from this file, that is:
> /usr/src/buildroot-20060308/build_arm/root	172.16.7.65(rw,no_root_squash)
> 
> If I try to mount a random directory, like just /usr, I get the expected result that it is blocked:
> Root-NFS: Server returned error -13 while mounting /usr/

Nicolas,

  Could you please try adding a map_static directive to your exports?
It should then look something like this:

/usr/src/buildroot-20060308/build_arm/root
172.16.7.65(rw,map_static=/etc/nfs/server.map,no_root_squash)

  If you ran the nfs-server-config script to set up the nfs-server, then
you should already have an /etc/nfs/server.map file that was created for
you by the setup script.  If not, you can create it, with the following
contents:

----- CUT -----
# Sample server map for nfsd
#
# This file maps 500/500 on an NFS client to the uid/gid of the
# user who ran nfs-server-config, and maps 0/0 on an NFS client
# the uid/gid of the Administrator account.
#
# Note that a server map is host-specific (which makes sense,
# if you think about it...)  So you can only use a plain IP
# address or DNS name to specify a client that uses a static_map.
#
# Examples of valid /etc/exports lines using map_static:
#
#   /gaunt   192.168.1.42(map_static=/etc/nfs/server.map)
#   /chaney  twilley(map_static=/etc/nfs/server.map)
#
uid     500     xxxxx   # user id - replace 'xxxxx'
gid     500     yyyyy   # group id - replace 'yyyyy'
uid     0       500     # user id for Administrator
gid     0       513     # group id for Administrator
----- CUT -----

  If you're having to create the server.map for your export by hand, you
will have to replace 'xxxxx' with the number reported by 'id -u
${USERNAME}' and 'yyyyy' with the number reported by 'id -g
${USERNAME}', ex:

  $ id -u ${USERNAME}
  <use this number to replace xxxxx in the above server.amp file>
  $ id -g ${USERNAME}
  <use this number to replace yyyyy in the above server.amp file>

-Samrobb



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

