CL Command Reference - EXPORTFS
CL Command List > EXPORTFS Reference
Description:
The Change Network File System Export (EXPORTFS) command adds directory names to (exports) or removes directory names from (unexports) the list of directory trees that are currently exported to Network File System (NFS) clients. The flags in the OPTIONS list indicate what actions the EXPORTFS command should perform.
A list of directories and options for exporting the directory and its contents is stored in the /etc/exports file. The EXPORTFS command allows the user to export all of the directory trees specified in the /etc/exports file using the -A flag, or to export a single directory tree by specifying the directory name. When the directory tree to be exported exists in the /etc/exports file, the user can export it with the options specified there, or one can use the -I flag to override the options, specifying the new options on the EXPORTFS command.
Ths user can also export a directory tree not previously defined in the /etc/exports file by providing the options for it on the EXPORTFS command. The user can unexport directory trees by using the -U flag on the EXPORTFS command.
The user can also add, change, or remove export entries in the /etc/exports file by using the -F flag.
This command can also be issued using the following alternative command name:
. CHGNFSEXP
Restrictions:
1. The user must have input/output (I/O) system configuration (*IOSYSCFG) special authority to use this command.
2. The user must have execute (*X) authority to each directory in the path name prefixes.
3. When the -F flag is specified and the /etc/exports file does not exist, the user must have write, execute (*WX) authority to the /etc directory.
4. When the -F flag is specified and the /etc/exports file does exist, the user must have read, write (*RW) authority to the /etc/exports file and *X authority to the /etc directory.
5. Mixed CCSID encoding schemes are not supported. Specified CCSIDs must be single-byte character set (SBCS) or pure double-byte character set (DBCS).
Examples:
The alternative command name for EXPORTFS is CHGNFSEXP. The following examples use the alternative command name, but EXPORTFS can be replaced directly for CHGNFSEXP in all of them.
Example 1: Exporting All Entries from /etc/exports
CHGNFSEXP OPTIONS(¡¯-A¡¯)
-or-
CHGNFSEXP ¡¯-A¡¯
Both of these commands export all entries that exist in the /etc/exports file.
Example 2: Exporting One Directory with Options
CHGNFSEXP ¡¯-I -O RO,ANON=guest1,ACCESS=Roch1:9.7.431.2¡¯
¡¯/programs/public¡¯ HOSTOPT((MIAMI1 850 850))
This command exports the directory tree under the path name /programs/public as read-only. It allows only two clients to mount this directory tree. It takes advantage of the positional parameters OPTIONS and DIR. It uses the HOSTOPT parameter to specify coded character set identifier (CCSID) for the host MIAMI1.
Example 3: Exporting One Directory with Options and Updating the /etc/exports File.
CHGNFSEXP ¡¯-I -F -O RO,ANON=guest1,ACCESS=Roch1:9.7.431.2¡¯
¡¯/programs/public¡¯ HOSTOPT((MIAMI1 850 850))
This command exports the directory tree under the path name /programs/public as read-only. It allows only two clients to mount this directory tree. The OPTIONS parameter value is specified positionally. It uses the HOSTOPT parameter to specify data and path name coded character set identifiers (CCSIDs) of 850 for host name MIAMI1.
In addition, it also adds an export entry for /programs/public, along with the OPTIONS and HOSTOPT parameter values, to the /etc/exports file.