ITS UNIX Systems
Syntax of entries in /etc/exports
The /etc/exports file contains an entry for every directory that you intend to share with NFS client machines. Each entry defines how one directory is shared. Within a UNIX filesystem, any directory may be exported to NFS clients, but once a directory has been exported, another directory lower which is under it may not be exported to a different list of clients.
The general form of an exports entry is
directory is the directory name.
optionlist is a comma-separated list of option keyword or keyword=hostlist items. In the latter option, the hostlist is a colon-separated list of host names or, in an NIS environment, host names and/or netgroup names, such as host1:host2:...:hostn or host1:netgroup1.
Note that if no options are selected, the default export is read-write to all hosts. You should never name a directory without specifying at least one of the following options in the optionlist:
- When selected as the only option, gives read-write mount access for only the hosts or netgroups in the client list specified.
- Permits read-only mount access. If the only option, all hosts are permitted access. To export read-only to a select client list, use ro,access=clientlist.
- Permits read-write mount access from the clients listed. If no other options are selected, implies read-only access from all other hosts. To grant read-write to one client list and read-only to another, you must specify rw=clientlist1,access=clientlist2.
- Gives root access to the root user on the specified hosts. Normally, the root user on the client host does not have root access in the NFS filesystem; requests from root on a client are translated into the user nobody on the server. In the special circumstances where you wish to allow root on a client host to have root access to the filesystem on the server, you may include this option. For this option, the host list may not contain a netgroup name; it must be a list of host names.
Page Updated: 2011-06-29