xref: /386bsd/usr/src/sbin/mountd/exports.5 (revision a2142627)
1.\" Copyright (c) 1989, 1991 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\" 3. All advertising materials mentioning features or use of this software
13.\"    must display the following acknowledgement:
14.\"	This product includes software developed by the University of
15.\"	California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\"    may be used to endorse or promote products derived from this software
18.\"    without specific prior written permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\"     @(#)exports.5	5.2 (Berkeley) 5/10/91
33.\"
34.Dd May 10, 1991
35.Dt EXPORTS 5
36.Os
37.Sh NAME
38.Nm exports
39.Nd define remote mount points for
40.Tn NFS
41mount requests
42.Sh SYNOPSIS
43.Nm exports
44.Sh DESCRIPTION
45The
46.Nm exports
47file
48specifies remote mount points for the
49.Tn NFS
50mount protocol per the
51.Tn NFS
52server specification; see
53.%T "Network File System Protocol Specification \\*(tNRFC\\*(sP 1094" .
54.Pp
55Each line in the file specifies one remote mount point.
56The first field is the mount point directory path followed
57optionally by export options and specific hosts separated by white space.
58Only the first entry for a given local file system may specify the export
59options, since these are handled on a
60.Em per local file system
61basis.
62If no specific hosts are specified,
63the mount point is exported to all hosts.
64.Pp
65The export options are as follows:
66.Sm off
67.Fl root No = Aq Sy uid
68.Sm on
69specifies how to map root's uid (default -2).
70The option
71.Fl r
72is synonyms for
73.Fl root
74in an effort to be backward compatible with older export file formats.
75.Pp
76.Fl ro
77specifies that the file system should be exported Read-only
78(default Read/Write).
79The option
80.Fl o
81is synonyms for
82.Fl ro
83in an effort to be backward compatible with older export file formats.
84.Pp
85For example:
86.Bd -literal -offset indent
87/usr -root=0 rickers snowhite.cis.uoguelph.ca
88/usr/local 131.104.48.16
89/u -root=5
90/u2 -ro
91.Ed
92.Pp
93Given that
94.Sy /usr ,
95.Sy /u
96and
97.Sy /u2
98are
99local file system mount points, the above example specifies the following:
100.Bd -filled -offset indent
101.Sy /usr
102is exported to hosts
103.Em rickers
104and
105.Em snowhite.cis.uoguelph.ca
106with
107root mapped to root.
108.Pp
109.Sy /usr/local
110is exported to host
111.Em 131.104.48.16
112with root mapped to root.
113.Pp
114.Sy /u
115is exported to all hosts with root mapped to uid 5.
116.Pp
117.Sy /u2
118is exported to all hosts Read-only with root mapped to -2.
119.Ed
120.Pp
121Note that
122.Dq Li "/usr/local -root=5"
123would have been incorrect,
124since
125.Sy /usr
126and
127.Sy /usr/local
128reside in the same local file system.
129.Sh FILES
130.Bl -tag -width /etc/exports -compact
131.It Pa /etc/exports
132The remote mount point file
133.Nm exports
134resides in
135.Pa /etc .
136.El
137.Sh SEE ALSO
138.Xr mountd 8 ,
139.Xr nfsd 8 ,
140.Xr showmount 8
141.Sh BUGS
142It would be nice if the export options were not tied to local mount points.
143.Sh HISTORY
144The
145.Nm
146file format is
147.Ud .
148