EXPORTS(5) BSD Programmer's Manual EXPORTS(5) NNAAMMEE eexxppoorrttss - define remote mount points for NFS mount requests SSYYNNOOPPSSIISS eexxppoorrttss DDEESSCCRRIIPPTTIIOONN The eexxppoorrttss file specifies remote mount points for the NFS mount protocol per the NFS server specification; see _N_e_t_w_o_r_k _F_i_l_e _S_y_s_t_e_m _P_r_o_t_o_c_o_l _S_p_e_c_i_f_i_c_a_t_i_o_n _R_F_C _1_0_9_4_, _A_p_p_e_n_d_i_x _A. 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 filesystem for one or more hosts. A host may be specified only once for each local filesystem on the server and there may be only one default en- try for each server filesystem that applies to all other hosts. The lat- ter exports the filesystem to the ``world'' and should be used only when the filesystem contains public information. In a mount entry, the first field(s) specify the directory path(s) within a server filesystem that can be mounted on by the corresponding client(s). There are two forms of this specification. The first is to list all mount points as absolute directory paths separated by whites- pace. The second is to specify the pathname of the root of the filesys- tem followed by the --aallllddiirrss flag; this form allows the host(s) to mount any directory within the filesystem. Mount points for a filesystem may appear on multiple lines each with different sets of hosts and export op- tions. The second component of a line specifies how the filesystem is to be ex- ported to the host set. The option flags specify whether the filesystem 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: --mmaapprroooott=uusseerr The credential of the specified user is used for remote ac- cess 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. --mmaapprroooott=uusseerr::ggrroouupp11::ggrroouupp22::...... The colon separated list is used to spec- ify the precise credential to be used for remote access by root. The el- ements of the list may be either names or numbers. Note that user: should be used to distinguish a credential containing no groups from a complete credential for that user. --mmaappaallll=uusseerr or --mmaappaallll=uusseerr::ggrroouupp11::ggrroouupp22::...... specifies a mapping for all client uids (including root) using the same semantics as --mmaapprroooott. The option --rr is a synonym for --mmaapprroooott in an effort to be backward com- patible with older export file formats. In the absence of --mmaapprroooott and --mmaappaallll options, remote accesses by root will result in using a credential of -2:-2. All other users will be mapped to their remote credential. If a --mmaapprroooott option is given, remote access by root will be mapped to that credential instead of -2:-2. If a --mmaappaallll option is given, all users (including root) will be mapped to that credential in place of their own. The --kkeerrbb option specifies that the Kerberos authentication server should be used to authenticate and map client credentials. (Note that this is NOT Sun NFS compatible and is supported for TCP transport only.) The --rroo option specifies that the filesystem should be exported read-only (default read/write). The option --oo is a synonym for --rroo in an effort to be backward compatible with older export file formats. 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 with- in 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 speci- fied by the flag --nneettwwoorrkk=nneettnnaammee and optionally --mmaasskk=nneettmmaasskk. If the mask is not specified, it will default to the mask for that network class (A, B or C; see inet(5)). For example: /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 -kerb -network cis-net -mask cis-mask Given that //uussrr, //uu and //uu22 are local filesystem mount points, the above example specifies the following: //uussrr is exported to hosts _f_r_i_e_n_d_s where friends is specified in the netgroup file with users mapped to their re- mote 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 _1_3_1_._1_0_4_._4_8_._1_6 and _g_r_u_m_p_y_._c_i_s_._u_o_g_u_e_l_p_h_._c_a 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 associat- ed with ``nobody''. //uu is exported to all hosts on the subnetwork _1_3_1_._1_0_4_._4_8 with root mapped to the uid for ``bin'' and with no group access. //uu22 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 and mapping all uids to credentials for the principal that is authenticated by a Kerberos ticket. FFIILLEESS /etc/exports The default remote mount-point file. SSEEEE AALLSSOO netgroup(5), mountd(8), nfsd(8), showmount(8) BBUUGGSS The 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 filesystem 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. 4.4BSD June 9, 1993 3