[ Previous |
Next |
Contents
| Glossary
| Home
| Search ]
AIX Version 4.3 Commands Reference, Volume 2
exportfs Command
Purpose
Exports and unexports directories to NFS
clients.
/usr/sbin/exportfs [ -a ]
[ -v ] [ -u ]
[ -i ] [ -fFile ]
[ -oOption [ ,Option ... ] ]
[ Directory ]
Description
The exportfs command makes local
directories available for Network File System (NFS) clients to mount. This
command is normally invoked during system startup by the /etc/rc.nfsfile and uses information in the /etc/exports
file to export one or more directories, which must be specified with full
path names.
The /etc/xtab file lists directories
that are currently exported. To display this file, enter the exportfs
command without flags or arguments. To alter the file or to alter the characteristics
of one of its directories, root users can edit the /etc/exports
file and run the exportfs command. Such alterations can be done
at any time. Never edit the /etc/xtab file directly.
Note: You cannot export a directory
that is either a parent directory or a subdirectory of one that is currently
exported and within the same file system.
Flags
-a |
Exports all directories listed in the /etc/exports file. |
-v |
Prints the name of each directory as it is exported or unexported. |
-u |
Unexports the directories you specify. When used with the -a
flag, unexports all directories listed in the /etc/exports file. |
-i |
Allows the exporting of directories not specified in the exports file
or ignores the options in the /etc/exports file. Normally the exportfscommand consults the /etc/exports file for the options associated
with the exported directory. |
-f File |
Specifies an export file, other than the /etc/exports file,
that contains a list of directories that you can export. This file should
follow the same format as the /etc/exports file. NOTE: This alternate
file will not be used for exporting directories automatically when the
system and NFS is started. The /etc/exports file is the only file
that is supported for specifying directories to export at system start. |
-oOptions |
Specifies optional characteristics for the exported directory. 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. |
anon = UID |
Uses the UID value as the effective user ID, if a request comes
from a root user.
The default value for this option is -2. Setting the value of the anon
option to -1 disables anonymous access. Thus, 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. |
access = Client[:Client,...] |
Gives mount access to each client listed. A client can be either a
host name or a net group name. Each client in the list is first checked
for in the /etc/netgroup database and then in the /etc/hosts
database. The default value allows any machine to mount the given directory. |
secure |
Requires clients to use a more secure protocol when accessing the directory. |
public |
Specifies a directory as the NFS Server public directory. This option
only applies to AIX Version 4.2.1. |
|
Examples
- To export all directories in the /etc/exports
file, enter:
exportfs -a
- To export one directory from the /etc/exports
file, enter:
exportfs /home/notes
In this example, the /home/notes directory is exported.
Note: For this command to work, the
/home/notes directory must be specified in the /etc/exports
file.
- To unexport a directory, enter:
exportfs -u /home/notes
In this example, the /home/notes directory is unexported.
- To display the name of the directory currently
being exported, enter:
exportfs -v
- To export a directory that is not specified
in the /etc/exports file, enter:
exportfs -i /home/zeus
In this example, the /home/zeus directory is exported without
restrictions.
- To export a directory and give netgroup members
permission to access this directory, enter:
exportfs access=cowboys:oilers /home/notes -o
In this example, the /home/notes directory is exported and
permits users of cowboys and oilers host machines to
have access.
- To export a directory with different options
from the /etc/exports file, enter:
exports -i -o -root=zorro:silver /directory
In this example, the /directory directory is exported and allows
root user access to zorro and silver host machines, regardless
of the access permissions specified in the /etc/exports file.
Files
/etc/exports |
Lists the directories that the server can export. |
/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. |
/etc/rc.nfs |
Contains the startup script for the NFS and &Symbol.NIS; daemons. |
Related Information
The chnfsexp
command, mknfsexp
command, rmnfsexp
command, showmount
command.
How
to Export a File System Using Secure NFS in AIX Version 4.3 System Management Guide: Communications and Networks.
List
of NFS Commands and List
of NFS Files.
Network
File System (NFS) Overview for System Management in AIX Version 4.3 System Management Guide: Communications and Networks.
[ Previous |
Next |
Contents
| Glossary
| Home
| Search ]