[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4 Files Reference

exports File for NFS

Purpose

Contains a list of directories that can be exported to Network File System (NFS) clients.

Description

The /etc/exports file contains an entry for each directory that can be exported to NFS clients. This file is read automatically by the exportfs command. If you change this file, you must run the exportfs command before the changes can affect the way the daemon operates.

Only when this file is present during system startup does the rc.nfs script execute the exportfs command and start the nfsd and mountd daemons.

Note: You cannot export either a parent directory or a subdirectory of an exported directory within the same file system.

Entries in the file are formatted as follows:

Directory -Option [ , Option ] ...

These entries are defined as follows:

Directory Specifies the directory name.
Option Specifies optional characteristics for the directory being exported. You can enter more than one variable by separating them with commas. Choose from the following options:
ro Exports the directory with read-only permission. Otherwise, if not specified, the directory is exported with read-write permission.
rw = Client [:Client]
                          Exports the directory with read-write permission to the machines specified by the Client parameter and read-only to all others. The Client parameter can be either the host name or the network name. If a rw host name is not specified, the directory is exported with read-write permission to all.
access = Client[:Client,...]
                          Gives mount access to each client listed. A client can be either a host name or a netgroup name. Each client in the list is first checked in the /etc/netgroup database and then in the /etc/hosts database. The default value allows any machine to mount the given directory.
anon= UID If a request comes from a root user, use the user identification (UID) value as the effective user ID.

The default value for this option is -2. Setting the value of the anon option to -1 disables anonymous access. Note that, by default, secure NFS accepts nonsecure requests as anonymous, and users who want more security can disable this feature by setting anon to a value of -1.

root = HostName[:HostName,...]
                          Gives root access only to the root users from the specified HostName. The default is for no hosts to be granted root access.
secure Requires clients to use a more secure protocol when accessing the directory.

A # (pound sign) anywhere in the file indicates a comment that extends to the end of the line.

Examples

  1. To export to netgroup clients, enter:
    /usr -access=clients
  2. To export to the world, enter:
    /usr/local
  3. To export to only these systems, enter:
    /usr2 -access=hermes:zip:tutorial
  4. To give root access only to these systems, enter:
    /usr/tps -root=hermes:zip
  5. To convert client root users to guest UID=100, enter:
    /usr/new -anon=100
  6. To export read-only to everyone, enter:
    /usr/bin -ro
  7. To allow several options on one line, enter:
    /usr/stuff -access=zip,anon=-3,ro

Implementation Specifics

This file is part of NFS in Network Support Facilities in Base Operating System (BOS) Runtime.

Files

/etc/xtab Lists currently exported directories.
/etc/hosts Contains an entry for each host on the network.
/etc/netgroup Contains information about each user group on the network.

Related Information

The exportfs command.

The nfsd daemon.

List of NFS Files.

NFS Services in AIX Version 4.3 System Management Guide: Communications and Networks.


[ Previous | Next | Contents | Glossary | Home | Search ]