xref: /freebsd/usr.sbin/mountd/exports.5 (revision fbbd9655e5107c68e4e0146ff22b73d7350475bc)
18fae3551SRodney W. Grimes.\" Copyright (c) 1989, 1991, 1993
28fae3551SRodney W. Grimes.\"	The Regents of the University of California.  All rights reserved.
38fae3551SRodney W. Grimes.\"
48fae3551SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
58fae3551SRodney W. Grimes.\" modification, are permitted provided that the following conditions
68fae3551SRodney W. Grimes.\" are met:
78fae3551SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
88fae3551SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
98fae3551SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
108fae3551SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
118fae3551SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
12*fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors
138fae3551SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
148fae3551SRodney W. Grimes.\"    without specific prior written permission.
158fae3551SRodney W. Grimes.\"
168fae3551SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
178fae3551SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
188fae3551SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
198fae3551SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
208fae3551SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
218fae3551SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
228fae3551SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
238fae3551SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
248fae3551SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
258fae3551SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
268fae3551SRodney W. Grimes.\" SUCH DAMAGE.
278fae3551SRodney W. Grimes.\"
2887564113SPeter Wemm.\"     @(#)exports.5	8.3 (Berkeley) 3/29/95
297f3dea24SPeter Wemm.\" $FreeBSD$
308fae3551SRodney W. Grimes.\"
3191095367SRick Macklem.Dd August 14, 2014
328fae3551SRodney W. Grimes.Dt EXPORTS 5
338fae3551SRodney W. Grimes.Os
348fae3551SRodney W. Grimes.Sh NAME
358fae3551SRodney W. Grimes.Nm exports
368fae3551SRodney W. Grimes.Nd define remote mount points for
378fae3551SRodney W. Grimes.Tn NFS
388fae3551SRodney W. Grimesmount requests
398fae3551SRodney W. Grimes.Sh SYNOPSIS
407c7fb079SRuslan Ermilov.Nm
418fae3551SRodney W. Grimes.Sh DESCRIPTION
428fae3551SRodney W. GrimesThe
4374853402SPhilippe Charnier.Nm
448fae3551SRodney W. Grimesfile specifies remote mount points for the
458fae3551SRodney W. Grimes.Tn NFS
468fae3551SRodney W. Grimesmount protocol per the
478fae3551SRodney W. Grimes.Tn NFS
488fae3551SRodney W. Grimesserver specification; see
491252c1bbSRuslan Ermilov.%T "Network File System Protocol Specification" ,
501252c1bbSRuslan ErmilovRFC1094, Appendix A and
511252c1bbSRuslan Ermilov.%T "NFS: Network File System Version 3 Specification" ,
521252c1bbSRuslan ErmilovAppendix I.
538fae3551SRodney W. Grimes.Pp
548fae3551SRodney W. GrimesEach line in the file
558fae3551SRodney W. Grimes(other than comment lines that begin with a #)
568fae3551SRodney W. Grimesspecifies the mount point(s) and export flags within one local server
57bcc1d071SRick Macklemfile system or the NFSv4 tree root for one or more hosts.
586060f586SDima DorfmanA long line may be split over several lines by ending all but the
59a03e46ecSRuslan Ermilovlast line with a backslash
60a03e46ecSRuslan Ermilov.Pq Ql \e .
61bcc1d071SRick MacklemA host may be specified only once for each local file or the NFSv4 tree root on the
628fae3551SRodney W. Grimesserver and there may be only one default entry for each server
638fae3551SRodney W. Grimesfile system that applies to all other hosts.
6480d9aed4SDaniel GerzoThe latter exports the file system to the
6580d9aed4SDaniel Gerzo.Dq world
6680d9aed4SDaniel Gerzoand should
678fae3551SRodney W. Grimesbe used only when the file system contains public information.
688fae3551SRodney W. Grimes.Pp
698fae3551SRodney W. GrimesIn a mount entry,
708fae3551SRodney W. Grimesthe first field(s) specify the directory path(s) within a server file system
718fae3551SRodney W. Grimesthat can be mounted on by the corresponding client(s).
72bcc1d071SRick MacklemThere are three forms of this specification.
738fae3551SRodney W. GrimesThe first is to list all mount points as absolute
748fae3551SRodney W. Grimesdirectory paths separated by whitespace.
75c95dfea9SRick MacklemThis list of directory paths should be considered an
76c95dfea9SRick Macklem.Dq administrative control ,
77c95dfea9SRick Macklemsince it is only enforced by the
78c95dfea9SRick Macklem.Xr mountd 8
79c95dfea9SRick Macklemdaemon and not the kernel.
80c95dfea9SRick MacklemAs such, it only applies to NFSv2 and NFSv3 mounts and only
81c95dfea9SRick Macklemwith respect to the client's use of the mount protocol.
828fae3551SRodney W. GrimesThe second is to specify the pathname of the root of the file system
838fae3551SRodney W. Grimesfollowed by the
848fae3551SRodney W. Grimes.Fl alldirs
858fae3551SRodney W. Grimesflag;
86a62dc406SDoug Rabsonthis form allows the host(s) to mount at any point within the file system,
8787564113SPeter Wemmincluding regular files if the
8887564113SPeter Wemm.Fl r
8991d299f5SKris Kennawayoption is used on
9091d299f5SKris Kennaway.Xr mountd 8 .
91c95dfea9SRick MacklemBecause NFSv4 does not use the mount protocol,
92c95dfea9SRick Macklemthe
93c95dfea9SRick Macklem.Dq administrative controls
9491095367SRick Macklemare not applied and all directories within this server
9591095367SRick Macklemfile system are mountable via NFSv4 even if the
96c95dfea9SRick Macklem.Fl alldirs
9791095367SRick Macklemflag has not been specified.
98bcc1d071SRick MacklemThe third form has the string ``V4:'' followed by a single absolute path
99580a9482SMaxim Konovalovname, to specify the NFSv4 tree root.
100c95dfea9SRick MacklemThis line does not export any file system, but simply marks where the root
101c95dfea9SRick Macklemof the server's directory tree is for NFSv4 clients.
102c95dfea9SRick MacklemThe exported file systems for NFSv4 are specified via the other lines
103c95dfea9SRick Macklemin the
1044d36343eSJoel Dahl.Nm
105c95dfea9SRick Macklemfile in the same way as for NFSv2 and NFSv3.
1068fae3551SRodney W. GrimesThe pathnames must not have any symbolic links in them and should not have
10780d9aed4SDaniel Gerzoany
10840873064SDaniel Gerzo.Dq Pa \&.
10980d9aed4SDaniel Gerzoor
11040873064SDaniel Gerzo.Dq Pa ..
11180d9aed4SDaniel Gerzocomponents.
1128fae3551SRodney W. GrimesMount points for a file system may appear on multiple lines each with
1138fae3551SRodney W. Grimesdifferent sets of hosts and export options.
1148fae3551SRodney W. Grimes.Pp
1158fae3551SRodney W. GrimesThe second component of a line specifies how the file system is to be
1168fae3551SRodney W. Grimesexported to the host set.
1178fae3551SRodney W. GrimesThe option flags specify whether the file system
11840873064SDaniel Gerzois exported read-only or read-write and how the client UID is mapped to
1198fae3551SRodney W. Grimesuser credentials on the server.
120bcc1d071SRick MacklemFor the NFSv4 tree root, the only option that can be specified in this
121bcc1d071SRick Macklemsection is
122bcc1d071SRick Macklem.Fl sec .
1238fae3551SRodney W. Grimes.Pp
1248fae3551SRodney W. GrimesExport options are specified as follows:
1258fae3551SRodney W. Grimes.Pp
1268fae3551SRodney W. Grimes.Sm off
1276f8f0226SDaniel Gerzo.Fl maproot Li = Sy user
1288fae3551SRodney W. Grimes.Sm on
1298fae3551SRodney W. GrimesThe credential of the specified user is used for remote access by root.
1308fae3551SRodney W. GrimesThe credential includes all the groups to which the user is a member
1318fae3551SRodney W. Grimeson the local machine (see
1328fae3551SRodney W. Grimes.Xr id 1 ) .
1338fae3551SRodney W. GrimesThe user may be specified by name or number.
134b875c2e9SJosh PaetzelThe user string may be quoted, or use backslash escaping.
1358fae3551SRodney W. Grimes.Pp
1368fae3551SRodney W. Grimes.Sm off
1376f8f0226SDaniel Gerzo.Fl maproot Li = Sy user:group1:group2:...
1388fae3551SRodney W. Grimes.Sm on
1398fae3551SRodney W. GrimesThe colon separated list is used to specify the precise credential
1408fae3551SRodney W. Grimesto be used for remote access by root.
1418fae3551SRodney W. GrimesThe elements of the list may be either names or numbers.
1428fae3551SRodney W. GrimesNote that user: should be used to distinguish a credential containing
1438fae3551SRodney W. Grimesno groups from a complete credential for that user.
144b875c2e9SJosh PaetzelThe group names may be quoted, or use backslash escaping.
1458fae3551SRodney W. Grimes.Pp
1468fae3551SRodney W. Grimes.Sm off
1476f8f0226SDaniel Gerzo.Fl mapall Li = Sy user
1488fae3551SRodney W. Grimes.Sm on
1498fae3551SRodney W. Grimesor
1508fae3551SRodney W. Grimes.Sm off
1516f8f0226SDaniel Gerzo.Fl mapall Li = Sy user:group1:group2:...
1528fae3551SRodney W. Grimes.Sm on
15340873064SDaniel Gerzospecifies a mapping for all client UIDs (including root)
1548fae3551SRodney W. Grimesusing the same semantics as
1558fae3551SRodney W. Grimes.Fl maproot .
1568fae3551SRodney W. Grimes.Pp
1578fae3551SRodney W. GrimesThe option
1588fae3551SRodney W. Grimes.Fl r
1598fae3551SRodney W. Grimesis a synonym for
1608fae3551SRodney W. Grimes.Fl maproot
1618fae3551SRodney W. Grimesin an effort to be backward compatible with older export file formats.
1628fae3551SRodney W. Grimes.Pp
1638fae3551SRodney W. GrimesIn the absence of
1648fae3551SRodney W. Grimes.Fl maproot
1658fae3551SRodney W. Grimesand
1668fae3551SRodney W. Grimes.Fl mapall
1678fae3551SRodney W. Grimesoptions, remote accesses by root will result in using a credential of -2:-2.
1688fae3551SRodney W. GrimesAll other users will be mapped to their remote credential.
1698fae3551SRodney W. GrimesIf a
1708fae3551SRodney W. Grimes.Fl maproot
1718fae3551SRodney W. Grimesoption is given,
1728fae3551SRodney W. Grimesremote access by root will be mapped to that credential instead of -2:-2.
1738fae3551SRodney W. GrimesIf a
1748fae3551SRodney W. Grimes.Fl mapall
1758fae3551SRodney W. Grimesoption is given,
1768fae3551SRodney W. Grimesall users (including root) will be mapped to that credential in
1778fae3551SRodney W. Grimesplace of their own.
1788fae3551SRodney W. Grimes.Pp
179a9148abdSDoug Rabson.Sm off
180a9148abdSDoug Rabson.Fl sec Li = Sy flavor1:flavor2...
181a9148abdSDoug Rabson.Sm on
182a9148abdSDoug Rabsonspecifies a colon separated list of acceptable security flavors to be
183a9148abdSDoug Rabsonused for remote access.
184a9148abdSDoug RabsonSupported security flavors are sys, krb5, krb5i and krb5p.
185a9148abdSDoug RabsonIf multiple flavors are listed, they should be ordered with the most
186a9148abdSDoug Rabsonpreferred flavor first.
187a9148abdSDoug RabsonIf this option is not present,
188a9148abdSDoug Rabsonthe default security flavor list of just sys is used.
189a9148abdSDoug Rabson.Pp
1908fae3551SRodney W. GrimesThe
1918fae3551SRodney W. Grimes.Fl ro
1928fae3551SRodney W. Grimesoption specifies that the file system should be exported read-only
1938fae3551SRodney W. Grimes(default read/write).
1948fae3551SRodney W. GrimesThe option
1958fae3551SRodney W. Grimes.Fl o
1968fae3551SRodney W. Grimesis a synonym for
1978fae3551SRodney W. Grimes.Fl ro
1988fae3551SRodney W. Grimesin an effort to be backward compatible with older export file formats.
1998fae3551SRodney W. Grimes.Pp
20074853402SPhilippe Charnier.Tn WebNFS
20174853402SPhilippe Charnierexports strictly according to the spec (RFC 2054 and RFC 2055) can
202cb3923e0SDoug Rabsonbe done with the
203cb3923e0SDoug Rabson.Fl public
204f63f700eSSheldon Hearnflag.
205f63f700eSSheldon HearnHowever, this flag in itself allows r/w access to all files in
20640873064SDaniel Gerzothe file system, not requiring reserved ports and not remapping UIDs.
207f63f700eSSheldon HearnIt
208cb3923e0SDoug Rabsonis only provided to conform to the spec, and should normally not be used.
20974853402SPhilippe CharnierFor a
21074853402SPhilippe Charnier.Tn WebNFS
21174853402SPhilippe Charnierexport,
212cb3923e0SDoug Rabsonuse the
213cb3923e0SDoug Rabson.Fl webnfs
214cb3923e0SDoug Rabsonflag, which implies
215cb3923e0SDoug Rabson.Fl public ,
216cb3923e0SDoug Rabson.Sm off
217cb3923e0SDoug Rabson.Fl mapall No = Sy nobody
218cb3923e0SDoug Rabson.Sm on
219cb3923e0SDoug Rabsonand
220cb3923e0SDoug Rabson.Fl ro .
221687c7280SCeri DaviesNote that only one file system can be
222687c7280SCeri Davies.Tn WebNFS
223687c7280SCeri Daviesexported on a server.
224cb3923e0SDoug Rabson.Pp
225cb3923e0SDoug RabsonA
226cb3923e0SDoug Rabson.Sm off
22710affec4SJoseph Koshy.Fl index No = Pa file
22874853402SPhilippe Charnier.Sm on
229cb3923e0SDoug Rabsonoption can be used to specify a file whose handle will be returned if
23094ba280cSRuslan Ermilova directory is looked up using the public filehandle
23194ba280cSRuslan Ermilov.Pq Tn WebNFS .
232f63f700eSSheldon HearnThis is to mimic the behavior of URLs.
233f63f700eSSheldon HearnIf no
234cb3923e0SDoug Rabson.Fl index
235cb3923e0SDoug Rabsonoption is specified, a directory filehandle will be returned as usual.
236cb3923e0SDoug RabsonThe
237cb3923e0SDoug Rabson.Fl index
238cb3923e0SDoug Rabsonoption only makes sense in combination with the
239cb3923e0SDoug Rabson.Fl public
240cb3923e0SDoug Rabsonor
241cb3923e0SDoug Rabson.Fl webnfs
242cb3923e0SDoug Rabsonflags.
243cb3923e0SDoug Rabson.Pp
244288fa14aSJoerg WunschSpecifying the
245288fa14aSJoerg Wunsch.Fl quiet
246288fa14aSJoerg Wunschoption will inhibit some of the syslog diagnostics for bad lines in
247288fa14aSJoerg Wunsch.Pa /etc/exports .
248288fa14aSJoerg WunschThis can be useful to avoid annoying error messages for known possible
249288fa14aSJoerg Wunschproblems (see
250288fa14aSJoerg Wunsch.Sx EXAMPLES
251288fa14aSJoerg Wunschbelow).
252288fa14aSJoerg Wunsch.Pp
2538fae3551SRodney W. GrimesThe third component of a line specifies the host set to which the line applies.
2548fae3551SRodney W. GrimesThe set may be specified in three ways.
2558fae3551SRodney W. GrimesThe first way is to list the host name(s) separated by white space.
25680d9aed4SDaniel Gerzo(Standard Internet
25780d9aed4SDaniel Gerzo.Dq dot
25880d9aed4SDaniel Gerzoaddresses may be used in place of names.)
25980d9aed4SDaniel GerzoThe second way is to specify a
26080d9aed4SDaniel Gerzo.Dq netgroup
26140873064SDaniel Gerzoas defined in the
26240873064SDaniel Gerzo.Pa netgroup
26340873064SDaniel Gerzofile (see
2648fae3551SRodney W. Grimes.Xr netgroup 5 ) .
26574853402SPhilippe CharnierThe third way is to specify an Internet subnetwork using a network and
2668fae3551SRodney W. Grimesnetwork mask that is defined as the set of all hosts with addresses within
2678fae3551SRodney W. Grimesthe subnetwork.
2688fae3551SRodney W. GrimesThis latter approach requires less overhead within the
2698fae3551SRodney W. Grimeskernel and is recommended for cases where the export line refers to a
2708fae3551SRodney W. Grimeslarge number of clients within an administrative subnet.
2718fae3551SRodney W. Grimes.Pp
2728fae3551SRodney W. GrimesThe first two cases are specified by simply listing the name(s) separated
2738fae3551SRodney W. Grimesby whitespace.
27480d9aed4SDaniel GerzoAll names are checked to see if they are
27580d9aed4SDaniel Gerzo.Dq netgroup
27680d9aed4SDaniel Gerzonames
2778fae3551SRodney W. Grimesfirst and are assumed to be hostnames otherwise.
2788fae3551SRodney W. GrimesUsing the full domain specification for a hostname can normally
2798fae3551SRodney W. Grimescircumvent the problem of a host that has the same name as a netgroup.
2808fae3551SRodney W. GrimesThe third case is specified by the flag
2818fae3551SRodney W. Grimes.Sm off
2826f8f0226SDaniel Gerzo.Fl network Li = Sy netname Op Li / Ar prefixlength
2838fae3551SRodney W. Grimes.Sm on
2848fae3551SRodney W. Grimesand optionally
2858fae3551SRodney W. Grimes.Sm off
2868fae3551SRodney W. Grimes.Fl mask No = Sy netmask .
2878fae3551SRodney W. Grimes.Sm on
28880d9aed4SDaniel GerzoThe netmask may be specified either by attaching a
28980d9aed4SDaniel Gerzo.Ar prefixlength
29080d9aed4SDaniel Gerzoto the
29180d9aed4SDaniel Gerzo.Fl network
29280d9aed4SDaniel Gerzooption, or by using a separate
29380d9aed4SDaniel Gerzo.Fl mask
29480d9aed4SDaniel Gerzooption.
2958fae3551SRodney W. GrimesIf the mask is not specified, it will default to the mask for that network
2968fae3551SRodney W. Grimesclass (A, B or C; see
297906c1e27SMike Pritchard.Xr inet 4 ) .
298288fa14aSJoerg WunschSee the
299288fa14aSJoerg Wunsch.Sx EXAMPLES
300288fa14aSJoerg Wunschsection below.
3018fae3551SRodney W. Grimes.Pp
30280d9aed4SDaniel GerzoScoped IPv6 address must carry scope identifier as documented in
30380d9aed4SDaniel Gerzo.Xr inet6 4 .
30480d9aed4SDaniel GerzoFor example,
30540873064SDaniel Gerzo.Dq Li fe80::%re2/10
30640873064SDaniel Gerzois used to specify
30740873064SDaniel Gerzo.Li fe80::/10
30840873064SDaniel Gerzoon
30940873064SDaniel Gerzo.Li re2
31040873064SDaniel Gerzointerface.
31180d9aed4SDaniel Gerzo.Pp
312bcc1d071SRick MacklemFor the third form which specifies the NFSv4 tree root, the directory path
313bcc1d071SRick Macklemspecifies the location within the server's file system tree which is the
314bcc1d071SRick Macklemroot of the NFSv4 tree.
31591095367SRick MacklemThere can only be one NFSv4 root directory per server.
31691095367SRick MacklemAs such, all entries of this form must specify the same directory path.
317211024e9SRick MacklemFor file systems other than ZFS,
318211024e9SRick Macklemthis location can be any directory and does not
319bcc1d071SRick Macklemneed to be within an exported file system. If it is not in an exported
320bcc1d071SRick Macklemfile system, a very limited set of operations are permitted, so that an
321bcc1d071SRick MacklemNFSv4 client can traverse the tree to an exported file system.
322bcc1d071SRick MacklemAlthough parts of the NFSv4 tree can be non-exported, the entire NFSv4 tree
323bcc1d071SRick Macklemmust consist of local file systems capable of being exported via NFS.
324211024e9SRick MacklemAll ZFS file systems in the subtree below the NFSv4 tree root must be
325211024e9SRick Macklemexported.
326bcc1d071SRick MacklemNFSv4 does not use the mount protocol and does permit clients to cross server
327bcc1d071SRick Macklemmount point boundaries, although not all clients are capable of crossing the
328bcc1d071SRick Macklemmount points.
329bcc1d071SRick Macklem.Pp
330bcc1d071SRick MacklemThe
331bcc1d071SRick Macklem.Fl sec
332bcc1d071SRick Macklemoption on these line(s) specifies what security flavors may be used for
333bcc1d071SRick MacklemNFSv4 operations that do not use file handles. Since these operations
334bcc1d071SRick Macklem(SetClientID, SetClientIDConfirm, Renew, DelegPurge and ReleaseLockOnwer)
335bcc1d071SRick Macklemallocate/modify state in the server, it is possible to restrict some clients to
336bcc1d071SRick Macklemthe use of the krb5[ip] security flavors, via this option.
337bcc1d071SRick MacklemSee the
338bcc1d071SRick Macklem.Sx EXAMPLES
339bcc1d071SRick Macklemsection below.
340bcc1d071SRick MacklemThis third form is meaningless for NFSv2 and NFSv3 and is ignored for them.
341bcc1d071SRick Macklem.Pp
342288fa14aSJoerg WunschThe
343288fa14aSJoerg Wunsch.Xr mountd 8
344288fa14aSJoerg Wunschutility can be made to re-read the
345288fa14aSJoerg Wunsch.Nm
346288fa14aSJoerg Wunschfile by sending it a hangup signal as follows:
347288fa14aSJoerg Wunsch.Bd -literal -offset indent
34880d9aed4SDaniel Gerzo/etc/rc.d/mountd reload
349288fa14aSJoerg Wunsch.Ed
350288fa14aSJoerg Wunsch.Pp
351288fa14aSJoerg WunschAfter sending the
352288fa14aSJoerg Wunsch.Dv SIGHUP ,
353288fa14aSJoerg Wunschcheck the
354288fa14aSJoerg Wunsch.Xr syslogd 8
355288fa14aSJoerg Wunschoutput to see whether
356288fa14aSJoerg Wunsch.Xr mountd 8
357288fa14aSJoerg Wunschlogged any parsing errors in the
358288fa14aSJoerg Wunsch.Nm
359288fa14aSJoerg Wunschfile.
360288fa14aSJoerg Wunsch.Sh FILES
361288fa14aSJoerg Wunsch.Bl -tag -width /etc/exports -compact
362288fa14aSJoerg Wunsch.It Pa /etc/exports
363288fa14aSJoerg Wunschthe default remote mount-point file
364288fa14aSJoerg Wunsch.El
365288fa14aSJoerg Wunsch.Sh EXAMPLES
3668fae3551SRodney W. Grimes.Bd -literal -offset indent
3678fae3551SRodney W. Grimes/usr /usr/local -maproot=0:10 friends
3688fae3551SRodney W. Grimes/usr -maproot=daemon grumpy.cis.uoguelph.ca 131.104.48.16
3698fae3551SRodney W. Grimes/usr -ro -mapall=nobody
3708fae3551SRodney W. Grimes/u -maproot=bin: -network 131.104.48 -mask 255.255.255.0
37180d9aed4SDaniel Gerzo/a -network 192.168.0/24
37280d9aed4SDaniel Gerzo/a -network 3ffe:1ce1:1:fe80::/64
3738fae3551SRodney W. Grimes/u2 -maproot=root friends
374492d981bSMark Murray/u2 -alldirs -network cis-net -mask cis-mask
375288fa14aSJoerg Wunsch/cdrom -alldirs,quiet,ro -network 192.168.33.0 -mask 255.255.255.0
376a9148abdSDoug Rabson/private -sec=krb5i
377a9148abdSDoug Rabson/secret -sec=krb5p
378bcc1d071SRick MacklemV4: /	-sec=krb5:krb5i:krb5p -network 131.104.48 -mask 255.255.255.0
379bcc1d071SRick MacklemV4: /	-sec=sys:krb5:krb5i:krb5p grumpy.cis.uoguelph.ca
3808fae3551SRodney W. Grimes.Ed
3818fae3551SRodney W. Grimes.Pp
3828fae3551SRodney W. GrimesGiven that
3836f8f0226SDaniel Gerzo.Pa /usr , /u , /a
3848fae3551SRodney W. Grimesand
38510affec4SJoseph Koshy.Pa /u2
3868fae3551SRodney W. Grimesare
3878fae3551SRodney W. Grimeslocal file system mount points, the above example specifies the following:
38888b3d518SDavid E. O'Brien.Pp
38940873064SDaniel GerzoThe file system rooted at
39010affec4SJoseph Koshy.Pa /usr
3918fae3551SRodney W. Grimesis exported to hosts
3928fae3551SRodney W. Grimes.Em friends
3938fae3551SRodney W. Grimeswhere friends is specified in the netgroup file
3948fae3551SRodney W. Grimeswith users mapped to their remote credentials and
39540873064SDaniel Gerzoroot mapped to UID 0 and group 10.
39680d9aed4SDaniel GerzoIt is exported read-write and the hosts in
39780d9aed4SDaniel Gerzo.Dq friends
39880d9aed4SDaniel Gerzocan mount either
39980d9aed4SDaniel Gerzo.Pa /usr
40080d9aed4SDaniel Gerzoor
40180d9aed4SDaniel Gerzo.Pa /usr/local .
4028fae3551SRodney W. GrimesIt is exported to
4038fae3551SRodney W. Grimes.Em 131.104.48.16
4048fae3551SRodney W. Grimesand
4058fae3551SRodney W. Grimes.Em grumpy.cis.uoguelph.ca
4068fae3551SRodney W. Grimeswith users mapped to their remote credentials and
40780d9aed4SDaniel Gerzoroot mapped to the user and groups associated with
40880d9aed4SDaniel Gerzo.Dq daemon ;
4098fae3551SRodney W. Grimesit is exported to the rest of the world as read-only with
41080d9aed4SDaniel Gerzoall users mapped to the user and groups associated with
41180d9aed4SDaniel Gerzo.Dq nobody .
4128fae3551SRodney W. Grimes.Pp
41340873064SDaniel GerzoThe file system rooted at
41410affec4SJoseph Koshy.Pa /u
4158fae3551SRodney W. Grimesis exported to all hosts on the subnetwork
4168fae3551SRodney W. Grimes.Em 131.104.48
41740873064SDaniel Gerzowith root mapped to the UID for
41880d9aed4SDaniel Gerzo.Dq bin
41980d9aed4SDaniel Gerzoand with no group access.
4208fae3551SRodney W. Grimes.Pp
42140873064SDaniel GerzoThe file system rooted at
42210affec4SJoseph Koshy.Pa /u2
42380d9aed4SDaniel Gerzois exported to the hosts in
42480d9aed4SDaniel Gerzo.Dq friends
42540873064SDaniel Gerzowith root mapped to UID and groups
42680d9aed4SDaniel Gerzoassociated with
42780d9aed4SDaniel Gerzo.Dq root ;
42880d9aed4SDaniel Gerzoit is exported to all hosts on network
42980d9aed4SDaniel Gerzo.Dq cis-net
43080d9aed4SDaniel Gerzoallowing mounts at any
431492d981bSMark Murraydirectory within /u2.
4322f47c461SSheldon Hearn.Pp
43340873064SDaniel GerzoThe file system rooted at
43480d9aed4SDaniel Gerzo.Pa /a
43580d9aed4SDaniel Gerzois exported to the network 192.168.0.0, with a netmask of 255.255.255.0.
43640873064SDaniel GerzoHowever, the netmask length in the entry for
43780d9aed4SDaniel Gerzo.Pa /a
43840873064SDaniel Gerzois not specified through a
43940873064SDaniel Gerzo.Fl mask
44040873064SDaniel Gerzooption, but through the
44140873064SDaniel Gerzo.Li / Ns Ar prefix
44240873064SDaniel Gerzonotation.
44340873064SDaniel Gerzo.Pp
44440873064SDaniel GerzoThe file system rooted at
44540873064SDaniel Gerzo.Pa /a
44640873064SDaniel Gerzois also exported to the IPv6 network
44740873064SDaniel Gerzo.Li 3ffe:1ce1:1:fe80::
44840873064SDaniel Gerzoaddress, using the upper 64 bits as the prefix.
44980d9aed4SDaniel GerzoNote that, unlike with IPv4 network addresses, the specified network
45080d9aed4SDaniel Gerzoaddress must be complete, and not just contain the upper bits.
45140873064SDaniel GerzoWith IPv6 addresses, the
45240873064SDaniel Gerzo.Fl mask
45340873064SDaniel Gerzooption must not be used.
45480d9aed4SDaniel Gerzo.Pp
455288fa14aSJoerg WunschThe file system rooted at
45610affec4SJoseph Koshy.Pa /cdrom
45740873064SDaniel Gerzowill be exported read-only to the entire network 192.168.33.0/24, including
458288fa14aSJoerg Wunschall its subdirectories.
459288fa14aSJoerg WunschSince
46010affec4SJoseph Koshy.Pa /cdrom
461288fa14aSJoerg Wunschis the conventional mountpoint for a CD-ROM device, this export will
462288fa14aSJoerg Wunschfail if no CD-ROM medium is currently mounted there since that line
463288fa14aSJoerg Wunschwould then attempt to export a subdirectory of the root file system
464288fa14aSJoerg Wunschwith the
465288fa14aSJoerg Wunsch.Fl alldirs
466288fa14aSJoerg Wunschoption which is not allowed.
4672f47c461SSheldon HearnThe
468288fa14aSJoerg Wunsch.Fl quiet
469288fa14aSJoerg Wunschoption will then suppress the error message for this condition that
470288fa14aSJoerg Wunschwould normally be syslogged.
471288fa14aSJoerg WunschAs soon as an actual CD-ROM is going to be mounted,
472288fa14aSJoerg Wunsch.Xr mount 8
473288fa14aSJoerg Wunschwill notify
4742f47c461SSheldon Hearn.Xr mountd 8
475288fa14aSJoerg Wunschabout this situation, and the
47610affec4SJoseph Koshy.Pa /cdrom
47757bd0fc6SJens Schweikhardtfile system will be exported as intended.
478288fa14aSJoerg WunschNote that without using the
479288fa14aSJoerg Wunsch.Fl alldirs
480288fa14aSJoerg Wunschoption, the export would always succeed.
481288fa14aSJoerg WunschWhile there is no CD-ROM medium mounted under
48210affec4SJoseph Koshy.Pa /cdrom ,
483288fa14aSJoerg Wunschit would export the (normally empty) directory
48410affec4SJoseph Koshy.Pa /cdrom
485288fa14aSJoerg Wunschof the root file system instead.
486a9148abdSDoug Rabson.Pp
487a9148abdSDoug RabsonThe file system rooted at
488a9148abdSDoug Rabson.Pa /private
489a9148abdSDoug Rabsonwill be exported using Kerberos 5 authentication and will require
490a9148abdSDoug Rabsonintegrity protected messages for all accesses.
491a9148abdSDoug RabsonThe file system rooted at
492a9148abdSDoug Rabson.Pa /secret
493a9148abdSDoug Rabsonwill also be exported using Kerberos 5 authentication and all messages
494a9148abdSDoug Rabsonused to access it will be encrypted.
495bcc1d071SRick Macklem.Pp
496bcc1d071SRick MacklemFor the experimental server, the NFSv4 tree is rooted at ``/'',
497bcc1d071SRick Macklemand any client within the 131.104.48 subnet is permitted to perform NFSv4 state
498bcc1d071SRick Macklemoperations on the server, so long as valid Kerberos credentials are provided.
499bcc1d071SRick MacklemThe machine grumpy.cis.uoguelph.ca is permitted to perform NFSv4 state
500bcc1d071SRick Macklemoperations on the server using AUTH_SYS credentials, as well as Kerberos ones.
5018fae3551SRodney W. Grimes.Sh SEE ALSO
502639e19ecSEdward Tomasz Napierala.Xr nfsv4 4 ,
5038fae3551SRodney W. Grimes.Xr netgroup 5 ,
5048fae3551SRodney W. Grimes.Xr mountd 8 ,
5058fae3551SRodney W. Grimes.Xr nfsd 8 ,
5068fae3551SRodney W. Grimes.Xr showmount 8
5078fae3551SRodney W. Grimes.Sh BUGS
5088fae3551SRodney W. GrimesThe export options are tied to the local mount points in the kernel and
5098fae3551SRodney W. Grimesmust be non-contradictory for any exported subdirectory of the local
5108fae3551SRodney W. Grimesserver mount point.
5118fae3551SRodney W. GrimesIt is recommended that all exported directories within the same server
5128fae3551SRodney W. Grimesfile system be specified on adjacent lines going down the tree.
5138fae3551SRodney W. GrimesYou cannot specify a hostname that is also the name of a netgroup.
5148fae3551SRodney W. GrimesSpecifying the full domain specification for a hostname can normally
5158fae3551SRodney W. Grimescircumvent the problem.
516