Introducing the /etc/exports file

/etc/exports controls client access to directories

The /etc/exports file controls how NFS clients access filer directories. You add entries to the /etc/exports file for all the directories you want to export.

Format for /etc/exports entries

The format of the entries in the /etc/exports file is as follows:

filer_directory_path export_specification

Filer directory path format

The filer directory path specifies which directory is made available to clients. The format is as follows:

/vol/volume_name/directory
Examples

The following lines show examples of filer directory paths:

/vol/vol0/home
/vol/users/local/jarnold

Export specification determines access privileges

The export specification specifies the privileges that clients have to mount and access the filer directory path. The format is as follows:

-root=list,-access=list,-ro=list,-rw=list
One keyword is required

The keywords -root, -access, -ro, and -rw are all optional; however, you must include at least one keyword in an export entry.

What the list variable represents

The list variable represents a list that includes one or more

You can combine elements in an entry

You can combine host names, netgroup names, and subnets in an entry, as shown in the following example:

-root=adminhost:administrators,-rw=blender:pcusers:123.45.67.0/24
Example 1: exporting default filer volume to administration host

The following line exports the root directory of the default filer volume to the administration host with root privileges. The administration host can mount the directory, change permissions and ownerships, and create and delete directories and files.

/vol/vol0 -root=adminhost
Example 2: exporting home directory to administration host and clients

The following line exports the home directory from the default filer volume to the administration host and two clients. The administration host has root privileges and can mount the directory, change permissions and ownerships, and create and delete directories and files. The clients can mount the directory and create and delete directories.

/vol/vol0/home -root=adminhost,-rw=blender:mixer

Related information

The following table describes related information that you might want to read.

Read... To learn about...
"Rules for exporting volumes and directories" Rules for exporting volumes and directories.
"Default /etc/exports entries" The default entries that setup places in the /etc/exports file.
"Restricting access to volumes and directories" Ways that you can restrict access to volumes and directories.
"The exportfs command" How to activate the exports listed in the /etc/exports file.


Copyright © 1999, Network Appliance, Inc. All rights reserved.

Part No. 210-02334
File: nfs2.htm
Last updated: 04/26/99 08:11:30