|
NAMEexports —
define remote mount points for NFS mount requests
SYNOPSIS
DESCRIPTIONTheexports file specifies remote mount points for the
NFS mount protocol per the NFS server specification; see
Network File System Protocol Specification, RFC1094,
Appendix A and NFS: Network File System Version 3
Specification, Appendix I.
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
file system or the NFSv4 tree root for one or more hosts. A long line may be
split over several lines by ending all but the last line with a backslash
(‘ In a mount entry, the first field(s) specify the directory path(s)
within a server file system that can be mounted on by the corresponding
client(s). There are three forms of this specification. The first is to list
all mount points as absolute directory paths separated by whitespace. This
list of directory paths should be considered an “administrative
control”, since it is only enforced by the
mountd(8)
daemon and not the kernel. As such, it only applies to NFSv2 and NFSv3
mounts and only with respect to the client's use of the mount protocol. The
second is to specify the pathname of the root of the file system followed by
the 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
system is exported read-only or read-write and how the client UID is mapped
to user credentials on the server. For the NFSv4 tree root, the only options
that can be specified in this section are ones related to security:
Export options are specified as follows:
The option In the absence of
The WebNFS exports strictly according to the spec (RFC 2054 and RFC
2055) can be done with the A
The -tls requires that the
client use TLS.
-tlscert requires that the client use TLS and provide a
verifiable X.509 certificate during TLS handshake.
-tlscertuser requires that the client use TLS and
provide a verifiable X.509 certificate. The otherName component of the
certificate's subjAltName must have a an OID of 1.3.6.1.4.1.2238.1.1.1 and a
UTF8 string of the form “user@domain”.
“user@domain” will be translated to the credentials of the
specified user in the same manner as
nfsuserd(8),
where “user” is normally a username is the server's password
database and “domain” is the DNS domain name for the server. All
RPCs will be performed using these credentials instead of the ones in the RPC
header in a manner similar to
-mapall =
user.If none of these three flags are specified, TLS mounts are permitted but not required. Specifying the 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 subnetwork using a network and network mask that is defined as the set of all hosts with addresses within the subnetwork. 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 subnet. 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 specified by the flag
Scoped IPv6 address must carry scope identifier as documented in
inet6(4).
For example, “ For the third form which specifies the NFSv4 tree root, the directory path specifies the location within the server's file system tree which is the root of the NFSv4 tree. There can only be one NFSv4 root directory per server. As such, all entries of this form must specify the same directory path. For file systems other than ZFS, this location can be any directory and does not need to be within an exported file system. If it is not in an exported file system, a very limited set of operations are permitted, so that an NFSv4 client can traverse the tree to an exported file system. Although parts of the NFSv4 tree can be non-exported, the entire NFSv4 tree must consist of local file systems capable of being exported via NFS. All ZFS file systems in the subtree below the NFSv4 tree root must be exported. NFSv4 does not use the mount protocol and does permit clients to cross server mount point boundaries, although not all clients are capable of crossing the mount points. The The
mountd(8)
utility can be made to re-read the /etc/rc.d/mountd reload After sending the FILES
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 /a -network 192.168.0/24 /a -network 3ffe:1ce1:1:fe80::/64 /u2 -maproot=root friends /u2 -alldirs -network cis-net -mask cis-mask /cdrom -alldirs,quiet,ro -network 192.168.33.0 -mask 255.255.255.0 /private -sec=krb5i /secret -sec=krb5p V4: / -sec=krb5:krb5i:krb5p -network 131.104.48 -mask 255.255.255.0 V4: / -sec=sys:krb5:krb5i:krb5p grumpy.cis.uoguelph.ca Given that /usr, /u, /a and /u2 are local file system mount points, the above example specifies the following: The file system rooted at /usr is exported to hosts friends where friends is specified in the netgroup file with users mapped to their remote credentials and root mapped to UID 0 and group 10. It is exported read-write and the hosts in “friends” can mount either /usr or /usr/local. It is exported to 131.104.48.16 and grumpy.cis.uoguelph.ca with users mapped to their remote credentials and root mapped to the user and groups associated with “daemon”; it is exported to the rest of the world as read-only with all users mapped to the user and groups associated with “nobody”. The file system rooted at /u is exported to all hosts on the subnetwork 131.104.48 with root mapped to the UID for “bin” and with no group access. The file system rooted at /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 file system rooted at /a is exported
to the network 192.168.0.0, with a netmask of 255.255.255.0. However, the
netmask length in the entry for /a is not specified
through a The file system rooted at /a is also
exported to the IPv6 network The file system rooted at /cdrom will be
exported read-only to the entire network 192.168.33.0/24, including all its
subdirectories. Since /cdrom is the conventional
mountpoint for a CD-ROM device, this export will fail if no CD-ROM medium is
currently mounted there since that line would then attempt to export a
subdirectory of the root file system with the
The file system rooted at /private will be exported using Kerberos 5 authentication and will require integrity protected messages for all accesses. The file system rooted at /secret will also be exported using Kerberos 5 authentication and all messages used to access it will be encrypted. For the experimental server, the NFSv4 tree is rooted at ``/'', and any client within the 131.104.48 subnet is permitted to perform NFSv4 state operations on the server, so long as valid Kerberos credentials are provided. The machine grumpy.cis.uoguelph.ca is permitted to perform NFSv4 state operations on the server using AUTH_SYS credentials, as well as Kerberos ones. In the following example some directories are exported as NFSv3 and NFSv4: V4: /wingsdl/nfsv4 /wingsdl/nfsv4/usr-ports -maproot=root -network 172.16.0.0 -mask 255.255.0.0 /wingsdl/nfsv4/clasper -maproot=root clasper Only one V4: line is needed or allowed to declare where NFSv4 is rooted. The other lines declare specific exported directories with their absolute paths given in /etc/exports. The exported directories' paths are used for both v3 and v4. However, they are interpreted differently for v3 and v4. A client mount command for usr-ports would use the server-absolute name when using nfsv3: mount server:/wingsdl/nfsv4/usr-ports /mnt/tmp A mount command using NFSv4 would use the path relative to the NFSv4 root: mount server:/usr-ports /mnt/tmp This also differentiates which version you want if the client can do both v3 and v4. The former will only ever do a v3 mount and the latter will only ever do a v4 mount. Note that due to different mount behavior between NFSv3 and NFSv4 a NFSv4 mount request for a directory that the client does not have permission for will succeed and read/write access will fail afterwards, whereas NFSv3 rejects the mount request. SEE ALSOnfsv4(4), netgroup(5), mountd(8), nfsd(8), rpc.tlsservd(8), showmount(8)STANDARDSThe implementation is based on the specification in Network File System Protocol Specification, Appendix A, RFC 1094, NFS: Network File System Version 3, Appendix I, RFC 1813, Towards Remote Procedure Call Encryption By Default, RFC nnnn.BUGSThe export options are tied to the local mount points in the kernel and must be non-contradictory for any exported subdirectory of the local server mount point. It is recommended that all exported directories within the same server file system be specified on adjacent lines going down the tree. You cannot specify a hostname that is also the name of a netgroup. Specifying the full domain specification for a hostname can normally circumvent the problem.
Visit the GSP FreeBSD Man Page Interface. |