Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mountd(8)

nfsd(8)

showmount(8)

exports(4)  —  File Formats

OSF  —  Environment_Note_Added

NAME

exports − Defines remote mount points for NFS mount requests

SYNOPSIS

/etc/exports

DESCRIPTION

The exports file specifies remote mount points for the NFS mount protocol per the NFS server specification (see Network File System Protocol Specification, RFC1094). 

Each line in the file specifies one remote mount point.  The first field is the mount point directory path, followed optionally by export options and specific hosts separated by white space.  Only the first entry for a given local file system may specify the export options, since these are handled on a per local file system basis.  If no specific hosts are specified, the mount point is exported to all hosts. 

The export options are as follows: −root=<uid> specifies how to map root’s UID (default -2).  The −r option is a synonym for −root in an effort to be backward compatible with older export file formats. 

The −ro option specifies that the file system should be exported read-only (default read/write).  The -o option is a synonym for −ro in an effort to be backward compatible with older export file formats. 

For example, suppose you enter:

/usr -root=0 milan kuan_yin.cis.berkeley.edu
/usr/local 555.555.55.55
/u -root=5
/u2 -ro

If /usr, /u and /u2 are local file system mount points, this specifies the following:

       •/usr is exported to hosts milan and kuan_yin.cis.berkeley.edu with root mapped to uid=0. 

       •/usr/local is exported to host 555.555.55.55 with root mapped to root.  (For security reasons, this example uses the fictitious IP address 555.555.55.55.) 

       •/u is exported to all hosts with root mapped to uid 5. 

       •/u2 is exported to all hosts Read-only with root mapped to -2. 

Note that /usr/local -root=5 would have been incorrect, since /usr and /usr/local reside in the same local file system and export options are tied to local mount points. 

ENVIRONMENT NOTES

This section describes system features that are not generic to OSF/1 but that are provided in this OSF/1 implementation. 

ULTRIX Compatibility

The exports file can also be used to restrict access to a particular set of remote systems. The mount request daemon mountd() checks the exports file each time it receives a mount request from an NFS client.

Each entry in the /etc/exports file consists of a file system or directory name followed by an optional list of options or an optional list of identifiers or both. The identifiers define which remote hosts can mount that particular file system or directory. The identifiers listed beside the name of each file system or directory can be either host names, IP addresses, or NIS netgroups names.

The exports file format is defined as follows:

pathname [-root=#] [-ro] [identifier_1 identifier_2 ... identifier_n]

or

#anything

pathname: Name of a mounted local file system or a directory of a mounted local file system. The pathname must begin in column 1.

options:

−root=#
Map client superuser access to uid #.  If you want to allow client superusers access to the file system or directory with the same permissions as a local superuser, use −root=0. Use −root=0 only if you trust the superuser on the client system.  The default is −root=-2, which maps a client superuser to nobody.  This limits access to world accessible files.  The −r option is a synonym for −root for backward compatibility. 

−roExport file system or directory read-only (default is read-write).  The −o option is a synonym for −ro for backward compatibility. 

The options can be applied to both file system and directory entries in /etc/exports.

identifiers: Host names or netgroups, or both, separated by white space, that specify the access list for this export.  Host names can optionally contain the local BIND domain name.  If no hosts or netgroups are specified, the mount daemon exports this file system or directory to anyone requesting it.

A number sign (#) anywhere in the line marks a comment that extends to the end of that line. 

A whitespace character in the left-most position of a line indicates a continuation line. 

Each file system that you want to allow clients to mount must be explicitly defined.  Exporting only the root (/) will not allow clients to mount /usr. Exporting only /usr will not allow clients to mount /usr/local, if it is a file system.

Duplicate directory entries are not allowed.  The first entry is valid and following duplicates are ignored. 

Desired export options must be explicitly specified for each exported resource: file system or directory.  If a file system and subdirectories within it are exported, the options associated with the file system are not “inherited”.  You do not need to export an entire file system to allow clients to mount subdirectories within it. 

The access list associated with each exported resource identifies which clients can mount that resource with the specified options.  For example, you can export an entire file system read-only, with a subdirectory within it exported read-write to a subset of clients.  If a client that is not identified in the export access list of a directory attempts to mount it, then access is checked against the closest exported ancestor.  If mount access is allowed at a higher level in the directory tree of the file system, the export options associated with the successful match will be in effect. 

Related Information

hosts(4), mountd(8), netgroup(4)
Guide to Network Setup
Guide to Network and Communications Management and Problem Solving

RELATED INFORMATION

Daemons: mountd(8), nfsd(8)

Commands: showmount(8)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026