NetBSD/usr.sbin/mountd/exports.5

150 lines
4.2 KiB
Groff

.\" Copyright (c) 1989, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)exports.5 5.2 (Berkeley) 5/10/91
.\"
.\" $Header: /cvsroot/src/usr.sbin/mountd/exports.5,v 1.3 1993/03/23 00:29:05 cgd Exp $
.\"
.Dd May 10, 1991
.Dt EXPORTS 5
.Os
.Sh NAME
.Nm exports
.Nd define remote mount points for
.Tn NFS
mount requests
.Sh SYNOPSIS
.Nm exports
.Sh DESCRIPTION
The
.Nm exports
file
specifies remote mount points for the
.Tn NFS
mount protocol per the
.Tn NFS
server specification; see
.%T "Network File System Protocol Specification \\*(tNRFC\\*(sP 1094" .
.Pp
Each line in the file specifies one remote mount point.
The first field is the mount point directory path followed
optionally by export options and specific hosts separated by white space.
Only the first entry for a given local file system may specify the export
options, since these are handled on a
.Em per local file system
basis.
If no specific hosts are specified,
the mount point is exported to all hosts.
.Pp
The export options are as follows:
.Sm off
.Fl root No = Aq Sy uid
.Sm on
specifies how to map root's uid (default -2).
The option
.Fl r
is synonyms for
.Fl root
in an effort to be backward compatible with older export file formats.
.Pp
.Fl ro
specifies that the file system should be exported Read-only
(default Read/Write).
The option
.Fl o
is synonyms for
.Fl ro
in an effort to be backward compatible with older export file formats.
.Pp
For example:
.Bd -literal -offset indent
/usr -root=0 rickers snowhite.cis.uoguelph.ca
/usr/local 131.104.48.16
/u -root=5
/u2 -ro
.Ed
.Pp
Given that
.Sy /usr ,
.Sy /u
and
.Sy /u2
are
local file system mount points, the above example specifies the following:
.Bd -filled -offset indent
.Sy /usr
is exported to hosts
.Em rickers
and
.Em snowhite.cis.uoguelph.ca
with
root mapped to root.
.Pp
.Sy /usr/local
is exported to host
.Em 131.104.48.16
with root mapped to root.
.Pp
.Sy /u
is exported to all hosts with root mapped to uid 5.
.Pp
.Sy /u2
is exported to all hosts Read-only with root mapped to -2.
.Ed
.Pp
Note that
.Dq Li "/usr/local -root=5"
would have been incorrect,
since
.Sy /usr
and
.Sy /usr/local
reside in the same local file system.
.Sh FILES
.Bl -tag -width /etc/exports -compact
.It Pa /etc/exports
The remote mount point file
.Nm exports
resides in
.Pa /etc .
.El
.Sh SEE ALSO
.Xr mountd 8 ,
.Xr nfsd 8 ,
.Xr showmount 8
.Sh BUGS
It would be nice if the export options were not tied to local mount points.
.Sh HISTORY
The
.Nm
file format is
.Ud .