DESCRIPTION
The exports file specifies remote mount points for the NFS mount protocol
per the NFS server specification; see Network File System Protocol
Specification RFC 1094, Appendix A and NFS: Network File System Version 3
Specification, Appendix I.
Lines that begin with a # are considered comments and are ignored.
Each line in the file specifies one or more exported directories, any
additional mountable sub-directories within those directories, export
flags, and one or more hosts (if access to the export is to be
restricted). All directories on the line must exist within the same
local file system.
Within a file system there may be several exported sub-directories with
different export options. However, none of those exported directories
may lie within another.
A host may be specified only once for each exported directory and there
may be only one default entry for each exported directory that applies to
all other hosts. The latter exports the file system to the ``world'' and
should be used only when the file system contains public information.
Any attempt to export the same directory to a host with different export
options will cause the conflicting export entry to be rejected.
The first field(s) of an export entry is a list of directories on a local
file system to export. At least one pathname must be to an exported
directory. Other pathnames may refer to sub-directories of the exported
directory to indicate that hosts are also allowed to explicitly mount
those sub-directories of the exported directory. (Note that the -alldirs
flag can be used to allow mounting any sub-directories of the pathnames
specified.)
The pathnames must not have any symbolic links in them and should not
have any "." or ".." components. Mount points for a file system may
appear on multiple lines each with different sets of hosts and export
options.
The second component of a line specifies how the file system is to be
exported to the host set. The option flags specify whether the file sys-
tem is exported read-only or read-write and how the client uid is mapped
to user credentials on the server.
Export options are specified as follows:
-maproot=user The credential of the specified user is used for remote
access by root. The credential includes all the groups to which the user
is a member on the local machine ( see id(1) ). The user may be specified
by name or number.
-maproot=user:group1:group2:... The colon separated list is used to spec-
access by root will be mapped to that credential instead of -2:-2. If a
-mapall option is given, all users (including root) will be mapped to
that credential in place of their own.
The -alldirs flag allows the host(s) to mount at any point within the
file system, including regular files if the -r option is used on mountd.
The -kerb option specifies that the Kerberos authentication server should
be used to authenticate and map client credentials. This option requires
that the kernel be built with the NFSKERB option.
The -ro option specifies that the file system should be exported read-
only (default read/write). The option -o is a synonym for -ro in an
effort to be backward compatible with older export file formats.
The -32bitclients option causes the NFS server to guarantee that direc-
tory cookies will fit within 32 bits even though directory cookies are 64
bits in NFSv3. This option may be required with NFS clients that do not
properly support 64 bit directory cookies. Use of this option may result
in sub-optimal performance of the exported file system.
The third component of a line specifies the host set to which the line
applies. The set may be specified in three ways. The first way is to
list the host name(s) separated by white space. (Standard internet
``dot'' addresses may be used in place of names.) The second way is to
specify a ``netgroup'' as defined in the netgroup file (see netgroup(5)
). The third way is to specify an internet sub-network using a network
and network mask that is defined as the set of all hosts with addresses
within the sub-network. This latter approach requires less overhead
within the kernel and is recommended for cases where the export line
refers to a large number of clients within an administrative sub-net.
The first two cases are specified by simply listing the name(s) separated
by whitespace. All names are checked to see if they are ``netgroup''
names first and are assumed to be hostnames otherwise. Using the full
domain specification for a hostname can normally circumvent the problem
of a host that has the same name as a netgroup. The third case is speci-
fied by the flag -network=netname and optionally -mask=netmask. If the
mask is not specified, it will default to the mask for that network class
(A, B or C; see inet(5) ).
EXAMPLES
/usr /usr/local -maproot=0:10 friends
/usr -maproot=daemon grumpy.cis.uoguelph.ca 131.104.48.16
/usr -ro -mapall=nobody
/u -maproot=bin: -network 131.104.48 -mask 255.255.255.0
/u2 -maproot=root friends
/u2 -alldirs -network cis-net -mask cis-mask
/Users -alldirs -network 2.29.96.0 -mask 255.255.255.0
/Applications -ro -network 2.29.96.0 -mask 255.255.255.0
Given that /usr, /u, /u2, and / are local file system mount points, the
/u2 is exported to the hosts in ``friends'' with root mapped to uid and
groups associated with ``root''; it is exported to all hosts on network
``cis-net'' allowing mounts at any directory within /u2.
The /Users and /Applications sub-directories of / are exported to all
hosts on the sub-network 2.29.96. Any directory within /Users can be
mounted. /Users is exported read-write and /Applications is exported
read-only.
FILES
/etc/exports The default remote mount-point file.
SEE ALSO
netgroup(5), mountd(8), nfsd(8), showmount(8)
BUGS
It is recommended that all exported directories within the same server
file system be specified on adjacent lines going down the tree. You can-
not specify a hostname that is also the name of a netgroup. Specifying
the full domain specification for a hostname can normally circumvent the
problem.
BSD March 8, 2005 BSD
Man(1) output converted with
man2html