exports(4) exports(4)NAME exports, xtab - directories to export to Network File System (NFS) clients SYNOPSIS /etc/exports /etc/xtab DESCRIPTION The file /etc/exports contains entries that are used by exportfs, that is started from /etc/inittab, to export directories and files, which makes them available to NFS clients for remote mounting. If you change this file after exportfs is started, you must run exportfs again to have the changes take effect. You can also run exportfs to override the entries in /etc/exports, to export additional directories that aren't listed in /etc/exports, or to unexport directories. The file /etc/xtab file contains entries for directories that are currently exported. This file should be used only by programs that call getexportent (see exportent(3)). The -u option of exportfs removes entries from this file. An entry in the /etc/exports file consists of a line of the following form: directory -option[,option]... The value of each component is as follows: directory Specifies the pathname of a directory or file. option Specifies one of the following options: access=client[:client]... Gives mount access to each NFS client specified by client. The value of client can be a host name or a netgroup (see netgroup(4)). The netgroup database, followed by the hosts database, is checked for each value of client. If you do not use this option, any computer is allowed to mount the given directory. If the network is running the name server, the host name for any one computer is entered twice: once as displayed by the hostname command (for example, hostname1) and once in fully qualified domain name format, with the domain name in uppercase letters (for example, January 1992 1
exports(4) exports(4)hostname1.ABC.COM). anon=uid Specifies that the value of uid is to be used as the effective user ID if a request comes from an unknown user. A user ID of 0 is always considered to be unknown by an NFS server unless the root option, described later in this list, is set for the host that made the request. The default value for this option is -2. Setting this option to -1 disables anonymous access. ro Exports the directory as a read-only directory. If this option is not specified, the directory is exported as a read-write directory. root=host-name[:host-name]... Gives the privileges of root only to users who are logged in as root on the host specified by host-name. If you do not use this option, any user who is logged in as root is denied the privileges normally accorded to root. If the network is running the name server, see the access option earlier in this section for the way in which host names must be specified. rw=host-name[:hostname]... Exports the directory as a read-mostly directory. The mode ``read-mostly'' means ``read-only'' for computers that aren't specified by a host-name argument, but ``read-write'' to those that are specified. If you do not use this option, the directory is exported ``read-write'' to all. If the network is running the name server, see the access option earlier in this section for the way in which host names must be specified. A number sign (#) anywhere on a line indicates that the rest of the line is a comment. EXAMPLES Here is an example of a /etc/exports file: /usr -access=clients # export to my clients /usr/local # export to the world /usr2 -access=hermes:zip:tutorial# export to only these computers /usr/sun -root=hermes:zip# give root access only to these /usr/newo -anon=0# give all computers root access /usr/bin -ro# export read-only to everyone /usr/stuff -access=zip,anon=-3,ro# several options on one line 2 January 1992
exports(4) exports(4)Compatibility With Previous File Formats In previous versions of A/UX, the format of this file was as follows: directory [host-name]... The old file format is compatible with exportfs and you can continue to use in with A/UX 3.0. WARNINGS Within the same file system, a parent directory or a subdirectory of a directory that is already exported cannot be exported. It would be illegal, for instance, to export both /usr and /usr/local if both directories reside in the same file system. FILES /etc/exports File that identifies directories and files to be exported /etc/hosts File of host names and Internet Protocol (IP) addresses /etc/netgroup File that defines network groups /etc/xtab File containing the currently exported directories SEE ALSO exportent(3), hosts(4), netgroup(4) exportfs(1M), nfsd(1M) in A/UX System Administrator's Reference January 1992 3