From dima@unixfreak.org  Fri Dec 29 21:27:41 2000
Return-Path: <dima@unixfreak.org>
Received: from bazooka.unixfreak.org (bazooka.unixfreak.org [63.198.170.138])
	by hub.freebsd.org (Postfix) with ESMTP id 29C7837B400
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 29 Dec 2000 21:27:41 -0800 (PST)
Received: from hornet.unixfreak.org (hornet [63.198.170.140])
	by bazooka.unixfreak.org (Postfix) with ESMTP
	id DA68F3E09; Fri, 29 Dec 2000 21:27:40 -0800 (PST)
Received: (from dima@localhost)
	by hornet.unixfreak.org (8.11.1/8.11.1) id eBU5Rd539336;
	Fri, 29 Dec 2000 21:27:39 -0800 (PST)
	(envelope-from dima)
Message-Id: <200012300527.eBU5Rd539336@hornet.unixfreak.org>
Date: Fri, 29 Dec 2000 21:27:39 -0800 (PST)
From: dima@unixfreak.org
Reply-To: dima@unixfreak.org
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] New FAQ entry about bad /etc/exports entries
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         23950
>Category:       docs
>Synopsis:       [PATCH] New FAQ entry about bad /etc/exports entries
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 29 21:30:01 PST 2000
>Closed-Date:    Sun Dec 31 03:18:47 GMT 2000
>Last-Modified:  Sun Dec 31 03:19:08 GMT 2000
>Originator:     Dima Dorfman
>Release:        FreeBSD 5.0-20001226-CURRENT i386
>Organization:
Private
>Environment:
System: FreeBSD spike.unixfreak.org 5.0-20001226-CURRENT FreeBSD 5.0-20001226-CURRENT #2: Wed Dec 27 01:03:18 PST 2000 dima@spike.unixfreak.org:/usr/home/dima/w/f/src/sys/compile/SPIKE i386

>Description:

A lot of people new to configuring NFS servers misunderstand the
exports(5) manual page when it talks about how the first parameter on
each line is a filesystem mount point rather than a directory.  This
FAQ entry attempts to clear that up a little bit.

>How-To-Repeat:

Read freebsd-questions for a while.  Look for new users frustrated
because they get weird errors when they try to export the same
filesystem twice.

>Fix:

Apply the following patch to doc/en_US.ISO_8859-1/books/faq/book.sgml.

The actual content was written by
Crist J. Clark <cjclark@reflexnet.net>.  I only did the markup.  Please
credit him in the commit log (see: http://www.FreeBSD.org/cgi/getmsg.cgi?fetch=227336+231212+/usr/local/www/db/text/2000/freebsd-doc/20001217.freebsd-doc).

Index: book.sgml
===================================================================
RCS file: /st/src/FreeBSD/doc/en_US.ISO_8859-1/books/faq/book.sgml,v
retrieving revision 1.129
diff -u -r1.129 book.sgml
--- book.sgml	2000/12/05 13:18:16	1.129
+++ book.sgml	2000/12/17 02:20:16
@@ -7701,6 +7701,66 @@
       </qandaentry>
 
       <qandaentry>
+        <question id="exports-errors">
+          <para>Why does <command>mountd</command> keep telling me it
+            <quote>can't change attributes</quote> and that I have a
+            <quote>bad exports list</quote> on my FreeBSD NFS
+            server?</para>
+        </question>
+
+        <answer>
+          <para>The most frequent problem is not understanding this
+            passage from the &man.exports.5 manual page
+            correctly:</para>
+
+          <programlisting>Each line in the file (other than comment lines that begin with a #)
+specifies the mount point(s) and export flags within one local server
+filesystem for one or more hosts.  A host may be specified only once
+for each local filesystem on the server and there may be only one
+default entry for each server filesystem that applies to all other
+hosts.</programlisting>
+
+          <para>This is made more clear by an example of a common
+            mistake. If everything above <filename>/usr</filename> is
+            part of one filesystem (there are no mounts above
+            <filename>/usr</filename>) the following exports list is
+            not valid:</para>
+
+          <programlisting>/usr/src   client
+/usr/ports client</programlisting>
+
+          <para>There are two lines specifying properties for one
+            filesystem, <filename>/usr</filename>, exported to the
+            same host, <hostid>client</hostid>. The correct format
+            is:</para>
+
+          <programlisting>/usr/src /usr/ports  client</programlisting>
+
+          <para>To rephrase the passage from the manual page, the
+            properties of one filesystem exported to a given host
+            (world-wide exports are treated like another unique host)
+            must all occur on one line. And yes, this does cause
+            limitiation in how you can export filesystems without ugly
+            workarounds, but for most people, this is not an
+            issue.</para>
+
+          <para>The following is an example of a valid export list,
+            where <filename>/usr</filename> and
+            <filename>/exports</filename> are local
+            filesystems:</para>
+
+          <programlisting># Export src and ports to client01 and client02, but only
+# client01 has root privileges on it
+/usr/src /usr/ports -maproot=0    client01
+/usr/src /usr/ports               client02
+# The "client" machines have root and can mount anywhere
+# up /exports. The world can mount /exports/obj read-only 
+/exports -alldirs -maproot=0      client01 client02
+/exports/obj -ro</programlisting>
+        </answer>
+      </qandaentry>
+
+      <qandaentry>
         <question id="ppp-nextstep">
           <para>I'm having problems talking PPP to NeXTStep
             machines.</para>

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ben 
State-Changed-When: Sun Dec 31 03:18:47 GMT 2000 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=23950 
>Unformatted:
