Skip to content »
ITS and UVa logos for printed output

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 -optionlist

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

Standards & Policy

University of Virginia
Information Technology Services
2015 Ivy Road
P.O. Box 400324
Charlottesville, Virginia, 22904-4324 USA

UVa Help Desk: 434-924-HELP (434-924-4357) •

Page Updated: 2011-06-29; © 2014 by the Rector and Visitors of the University of Virginia.

The information contained on the University of Virginia’s Department of Information Technology Services (ITS) website is provided as a public service with the understanding that ITS makes no representations or warranties, either expressed or implied, concerning the accuracy, completeness, reliability or suitability of the information, including warrantees of title, non-infringement of copyright or patent rights of others. These pages are expected to represent the University of Virginia community and the State of Virginia in a professional manner in accordance with the University of Virginia’s Computing Policies.