376 lines
19 KiB
HTML
376 lines
19 KiB
HTML
|
|
<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head><META http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<title>Create Directory (MD)</title>
|
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</head>
|
|
<body bgcolor="white">
|
|
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<a name="MD.Top_Of_Page"></a>
|
|
<h2>Create Directory (MD)</h2>
|
|
<table width="100%">
|
|
<tr>
|
|
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
|
|
<b>Threadsafe: </b>No
|
|
</td>
|
|
<td valign="top" align="right">
|
|
<a href="#MD.PARAMETERS.TABLE">Parameters</a><br>
|
|
<a href="#MD.COMMAND.EXAMPLES">Examples</a><br>
|
|
<a href="#MD.ERROR.MESSAGES">Error messages</a></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div> <a name="MD"></a>
|
|
<p>The Create Directory (MD) command adds a new directory to the system.
|
|
</p>
|
|
<p>A directory is an object that contains the names of other objects. Libraries and folders are types of directories. When a directory is created, a link is added to the directory prefix. The directory must have been created before any objects can be placed into it.
|
|
</p>
|
|
<p>This command is an alias for the Create Directory (CRTDIR) command and can also be issued using the following alternative command names:
|
|
</p>
|
|
<ul>
|
|
<li>CRTDIR
|
|
</li>
|
|
<li>MKDIR
|
|
</li>
|
|
</ul>
|
|
<p>For more information about integrated file system commands, see the Integrated file system information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
|
|
</p>
|
|
<p><b>Restrictions:</b>
|
|
</p>
|
|
<ol>
|
|
<li>The following restriction applies when the directory to be created is a library in the QSYS.LIB or independent ASP QSYS.LIB file system, or a directory within the "root" (/), QOpenSys, or user-defined file systems:
|
|
<ul>
|
|
<li>The audit (*AUDIT) special authority is required when specifying a value other than *SYSVAL on the <b>Auditing value for objects (CRTOBJAUD)</b> parameter.
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li>The following restriction applies when the directory to be created is a folder in an existing folder in QDLS:
|
|
<ul>
|
|
<li>The change (*CHANGE) authority is required for the existing folder.
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li>The user must have execute (*X) authority to each directory in the path.
|
|
</li>
|
|
<li>When creating a directory in the "root" (/), QOpenSys or user_defined file system, the user must have write, execute (*WX) authority to the directory that contains the new directory.
|
|
</li>
|
|
<li>When creating a directory, the owner ID (UID) is the user creating the directory.
|
|
<p>If the directory is to be created in the "root" (/), QOpenSys, and user-defined file systems, the following applies. If the S_ISGID bit of the parent directory is off, the group ID (GID) is set to the effective GID of the thread creating the directory. If the S_ISGID bit of the parent directory is on, the group ID (GID) of the new directory is set to the GID of the parent directory.
|
|
</p>
|
|
<p>If the directory is to be created in the QSYS.LIB or independent ASP QSYS.LIB file system, the GID is obtained from the primary user profile. For all other file systems, the GID is obtained from the parent directory.
|
|
</p>
|
|
</li>
|
|
<li>The user must have all object (*ALLOBJ) and security administrator (*SECADM) special authorities to specify a value for the <b>Scanning option for objects (CRTOBJSCAN)</b> parameter other than *PARENT.
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#MD.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
|
|
<div>
|
|
<h3><a name="MD.PARAMETERS.TABLE">Parameters</a></h3>
|
|
<table border="1" cellpadding="4" cellspacing="0">
|
|
<!-- col1="10" col2="15" col3="30" col4="10" -->
|
|
<tr>
|
|
<th bgcolor="aqua" valign="bottom" align="left">Keyword</th>
|
|
<th bgcolor="aqua" valign="bottom" align="left">Description</th>
|
|
<th bgcolor="aqua" valign="bottom" align="left">Choices</th>
|
|
<th bgcolor="aqua" valign="bottom" align="left">Notes</th>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#MD.DIR"><b>DIR</b></a></td>
|
|
<td valign="top">Directory</td>
|
|
<td valign="top"><i>Path name</i></td>
|
|
<td valign="top">Required, Positional 1</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#MD.DTAAUT"><b>DTAAUT</b></a></td>
|
|
<td valign="top">Public authority for data</td>
|
|
<td valign="top"><i>Name</i>, <b><u>*INDIR</u></b>, *RWX, *RW, *RX, *WX, *R, *W, *X, *EXCLUDE, *NONE</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#MD.OBJAUT"><b>OBJAUT</b></a></td>
|
|
<td valign="top">Public authority for object</td>
|
|
<td valign="top">Single values: <b><u>*INDIR</u></b>, *NONE, *ALL<br>Other values (up to 4 repetitions): *OBJEXIST, *OBJMGT, *OBJALTER, *OBJREF</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#MD.CRTOBJAUD"><b>CRTOBJAUD</b></a></td>
|
|
<td valign="top">Auditing value for objects</td>
|
|
<td valign="top"><b><u>*SYSVAL</u></b>, *NONE, *USRPRF, *CHANGE, *ALL</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#MD.CRTOBJSCAN"><b>CRTOBJSCAN</b></a></td>
|
|
<td valign="top">Scanning option for objects</td>
|
|
<td valign="top"><b><u>*PARENT</u></b>, *YES, *NO, *CHGONLY</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#MD.RSTDRNMUNL"><b>RSTDRNMUNL</b></a></td>
|
|
<td valign="top">Restricted rename and unlink</td>
|
|
<td valign="top"><b><u>*NO</u></b>, *YES</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#MD.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
</div>
|
|
<div> <a name="MD.DIR"></a>
|
|
<h3>Directory (DIR)</h3>
|
|
<p>Specifies the path name of the directory to be created.
|
|
</p>
|
|
<p>For more information on specifying path names, refer to "Object naming rules" in the CL concepts and reference topic in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
|
|
</p>
|
|
<p>
|
|
<b>Note: </b>Do not use a name that begins with the character Q. The system assumes that libraries or directories with those names are system libraries or directories.
|
|
</p>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#MD.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="MD.DTAAUT"></a>
|
|
<h3>Public authority for data (DTAAUT)</h3>
|
|
<p>Specifies the public data authority given to the user for the directory, or specifies that all authorities are inherited from the directory it is to be created in.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*INDIR</u></b></dt>
|
|
<dd>The authority for the directory to be created is determined by the directory it is to be created in. The directory immediately preceding the new directory determines the authority. A directory created in the "root" (/), QOpenSys, or user-defined file system is assigned the same public, private and primary group authority, authorization list, and primary group as the directory it is to be created in. A directory created in QDLS for a folder defaults to *EXCLUDE for a first level folder. If created in the second level or greater, the authority of the previous level is used. The QOpenSys and "root" (/) file systems use the parent directory's Data Authority value. If the value *INDIR is specified for either the <b>Public authority for object (OBJAUT)</b> parameter or the DTAAUT parameter, then *INDIR must be specified for both parameters.
|
|
</dd>
|
|
<dt><b>*RWX</b></dt>
|
|
<dd>The user can change the object and perform basic functions on the object except those limited to the owner or controlled by object existence (*OBJEXIST), object management (*OBJMGT), object alter (*OBJALTER) and object reference (*OBJREF) authorities. Read, write, execute (*RWX) authority provides object operational (*OBJOPR) and all data authorities.
|
|
</dd>
|
|
<dt><b>*RW</b></dt>
|
|
<dd>The user can view and change the contents of an object. Read, write (*RW) authority provides *OBJOPR and data read (*READ), add (*ADD), update (*UPD) and delete (*DLT) authorities.
|
|
</dd>
|
|
<dt><b>*RX</b></dt>
|
|
<dd>The user can perform basic operations on the object, such as run a program or display the contents of a file. The user is prevented from changing the object. Read, execute (*RX) authority provides *OBJOPR and data *READ and execute (*EXECUTE) authorities.
|
|
</dd>
|
|
<dt><b>*WX</b></dt>
|
|
<dd>The user can change the contents of an object and run a program or search a library or directory. Write, execute (*WX) authority provides *OBJOPR and data *ADD, *UPD, *DLT, and *EXECUTE authorities.
|
|
</dd>
|
|
<dt><b>*R</b></dt>
|
|
<dd>The user can view the contents of an object. Read (*R) authority provides *OBJOPR and data *READ authorities.
|
|
</dd>
|
|
<dt><b>*W</b></dt>
|
|
<dd>The user can change the contents of an object. Write (*W) authority provides *OBJOPR and data *ADD, *UPD, and *DLT authorities.
|
|
</dd>
|
|
<dt><b>*X</b></dt>
|
|
<dd>The user can run a program or search a library or directory. Execute (*X) authority provides *OBJOPR and data *EXECUTE authorities.
|
|
</dd>
|
|
<dt><b>*EXCLUDE</b></dt>
|
|
<dd>The user cannot access the object. The OBJAUT value must be *NONE, if this special value is used.
|
|
</dd>
|
|
<dt><b>*NONE</b></dt>
|
|
<dd>The user is given no data authorities to the objects. This value cannot be used with the OBJAUT value of *NONE.
|
|
</dd>
|
|
<dt><b><i>authorization-list-name</i></b></dt>
|
|
<dd>Specify the name of the authorization list used. The format of the authorization list name remains the current ten-character format. The OBJAUT value must be *NONE, if this special value is used.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#MD.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="MD.OBJAUT"></a>
|
|
<h3>Public authority for object (OBJAUT)</h3>
|
|
<p>Specifies the public object authority given to users for the directory, or specifies that all authorities are inherited from the directory it is to be created in.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*INDIR</u></b></dt>
|
|
<dd>The object authority is based on the authority for the directory where this directory is to be created. A directory created in the "root" (/), QOpenSys, or user-defined file system is assigned the same public, private and primary group authority, authorization list, and primary group as the directory it is to be created in. If the value *INDIR is specified for either the OBJAUT parameter or the <b>Public authority for data (DTAAUT)</b> parameter, then *INDIR must be specified for both parameters.
|
|
</dd>
|
|
<dt><b>*NONE</b></dt>
|
|
<dd>None of the other object authorities (*OBJEXIST, *OBJMGT, *OBJALTER or *OBJREF) are given to the users. If *EXCLUDE or an authorization list is specified for the DTAAUT parameter, *NONE must be specified. This value cannot be used with the DTAAUT value of *NONE.
|
|
</dd>
|
|
<dt><b>*ALL</b></dt>
|
|
<dd>All of the other object authorities (*OBJEXIST, *OBJMGT, *OBJALTER or *OBJREF) are given to the users.
|
|
<p><b>The user can specify up to four of the following values:</b>
|
|
</p>
|
|
</dd>
|
|
<dt><b>*OBJEXIST</b></dt>
|
|
<dd>The user is given object existence (*OBJEXIST) authority to the object. The user can delete the object, free storage of the object, perform save and restore operations for the object, and transfer ownership of the object.
|
|
</dd>
|
|
<dt><b>*OBJMGT</b></dt>
|
|
<dd>The user is given object management (*OBJMGT) authority to the object. With this authority the user can specify security for the object, move or rename the object and add members to database files.
|
|
</dd>
|
|
<dt><b>*OBJALTER</b></dt>
|
|
<dd>The user is given object alter (*OBJALTER) authority to the object. The user is able to alter the attributes of the objects. On a database file, the user can add and remove triggers, add and remove referential and unique constraints, and change the attributes of the database file. With this authority on an SQL package, the user can change the attributes of the SQL package. Currently, this authority is used only for database files and SQL packages.
|
|
</dd>
|
|
<dt><b>*OBJREF</b></dt>
|
|
<dd>The user is given object reference (*OBJREF) authority to objects. Used only for database files, the user can reference an object from another object such that operations on that object may be restricted by the other object. On a physical file, the user can add a referential constraint in which the physical file is the parent.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#MD.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="MD.CRTOBJAUD"></a>
|
|
<h3>Auditing value for objects (CRTOBJAUD)</h3>
|
|
<p>Specifies the auditing value of objects created in this directory.
|
|
</p>
|
|
<p>Values for this parameter other than *SYSVAL may not be supported by some file systems.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*SYSVAL</u></b></dt>
|
|
<dd>The object auditing value for the objects in the directory is determined by the Create object auditing (QCRTOBJAUD) system value.
|
|
</dd>
|
|
<dt><b>*NONE</b></dt>
|
|
<dd>Using or changing this object does not cause an audit entry to be sent to the security journal.
|
|
</dd>
|
|
<dt><b>*USRPRF</b></dt>
|
|
<dd>The user profile of the user accessing this object is used to determine if an audit record is sent for this access. The OBJAUD parameter of the Change User Auditing (CHGUSRAUD) command is used to change the auditing for a specific user.
|
|
</dd>
|
|
<dt><b>*CHANGE</b></dt>
|
|
<dd>All change accesses to this object by all users are logged.
|
|
</dd>
|
|
<dt><b>*ALL</b></dt>
|
|
<dd>All change or read accesses to this object by all users are logged.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#MD.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="MD.CRTOBJSCAN"></a>
|
|
<h3>Scanning option for objects (CRTOBJSCAN)</h3>
|
|
<p>Specifies whether the objects created in a directory will be scanned when exit programs are registered with any of the integrated file system scan-related exit points.
|
|
</p>
|
|
<p>The integrated file system scan-related exit points are:
|
|
</p>
|
|
<ul>
|
|
<li>QIBM_QP0L_SCAN_OPEN - Integrated File System Scan on Open Exit Program
|
|
</li>
|
|
<li>QIBM_QP0L_SCAN_CLOSE - Integrated File System Scan on Close Exit Program
|
|
</li>
|
|
</ul>
|
|
<p>For details on these exit points, see the System API Reference information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
|
|
</p>
|
|
<p>This attribute can only be specified for directories created in the "root" (/), QOpenSys and user-defined file systems. For all other file systems, *PARENT should be specified and it will be ignored. Even though this attribute can be set for *TYPE1 and *TYPE2 directories, only objects which are in *TYPE2 directories will actually be scanned, no matter what value is set for this attribute.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*PARENT</u></b></dt>
|
|
<dd>The create object scanning attribute value for this directory is copied from the create object scanning attribute value of the parent directory.
|
|
</dd>
|
|
<dt><b>*YES</b></dt>
|
|
<dd>After an object is created in the directory, the object will be scanned according to the rules described in the scan-related exit programs if the object has been modified or if the scanning software has been updated since the last time the object was scanned.
|
|
</dd>
|
|
<dt><b>*NO</b></dt>
|
|
<dd>After an object is created in the directory, the object will not be scanned by the scan-related exit programs.
|
|
<p>
|
|
<b>Note: </b>If the Scan file systems control (QSCANFSCTL) value *NOPOSTRST is not specified when an object with this attribute is restored, the object will be scanned at least once after the restore.
|
|
</p>
|
|
</dd>
|
|
<dt><b>*CHGONLY</b></dt>
|
|
<dd>After an object is created in the directory, the object will be scanned according to the rules described in the scan-related exit programs only if the object has been modified since the last time the object was scanned. It will not be scanned if the scanning software has been updated. This attribute only takes effect if the Scan file systems control (QSCANFSCTL) system value has *USEOCOATR specified. Otherwise, it will be treated as if the attribute is *YES.
|
|
<p>
|
|
<b>Note: </b>If the Scan file systems control (QSCANFSCTL) value *NOPOSTRST is not specified when an object with this attribute is restored, the object will be scanned at least once after the restore.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#MD.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="MD.RSTDRNMUNL"></a>
|
|
<h3>Restricted rename and unlink (RSTDRNMUNL)</h3>
|
|
<p>Specifies whether special restrictions apply for rename and unlink operations performed on objects within a directory. This attribute is equivalent to the S_ISVTX mode bit and can only be set for a directory in the Network File System (NFS), QFileSvr.400, "root" (/), QOpenSys, or user-defined file systems. Both the NFS and QFileSvr.400 file systems support this attribute by passing it to the server and surfacing it to the caller.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NO</u></b></dt>
|
|
<dd>No additional restrictions for renaming or unlinking objects from this directory.
|
|
</dd>
|
|
<dt><b>*YES</b></dt>
|
|
<dd>Objects within this directory may be renamed or unlinked only if one or more of the following are true for the user performing the operation:
|
|
<ol>
|
|
<li>The user is the owner of the object.
|
|
</li>
|
|
<li>The user is the owner of the directory.
|
|
</li>
|
|
<li>The user has all object (*ALLOBJ) special authority.
|
|
</li>
|
|
</ol>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#MD.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
<div><h3><a name="MD.COMMAND.EXAMPLES">Examples</a> </h3>
|
|
<p>The alternative command name for MD is CRTDIR. The following examples use the alternative command name, but MD can be replaced directly for CRTDIR in all of them.
|
|
</p>
|
|
<p><b>Example 1: Creating a Directory</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
CRTDIR DIR('MYDIR')
|
|
</pre>
|
|
</p>
|
|
<p>This command creates the directory MYDIR and adds it to the current directory. The defaults are used for the remaining parameters.
|
|
</p>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#MD.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
<div><h3><a name="MD.ERROR.MESSAGES">Error messages</a> </h3>
|
|
<p><b><u>*ESCAPE Messages</u></b>
|
|
</p>
|
|
<dl>
|
|
<dt><b>CPFA085</b></dt>
|
|
<dd>Home directory not found for user &1.
|
|
</dd>
|
|
<dt><b>CPFA089</b></dt>
|
|
<dd>Pattern not allowed in path name.
|
|
</dd>
|
|
<dt><b>CPFA09C</b></dt>
|
|
<dd>Not authorized to object. Object is &1.
|
|
</dd>
|
|
<dt><b>CPFA09D</b></dt>
|
|
<dd>Error occurred in program &1.
|
|
</dd>
|
|
<dt><b>CPFA0A0</b></dt>
|
|
<dd>Object already exists. Object is &1.
|
|
</dd>
|
|
<dt><b>CPFA0A1</b></dt>
|
|
<dd>An input or output error occurred.
|
|
</dd>
|
|
<dt><b>CPFA0A3</b></dt>
|
|
<dd>Path name resolution causes looping.
|
|
</dd>
|
|
<dt><b>CPFA0A6</b></dt>
|
|
<dd>Number of links exceeds maximum allowed for the file system.
|
|
</dd>
|
|
<dt><b>CPFA0A7</b></dt>
|
|
<dd>Path name too long.
|
|
</dd>
|
|
<dt><b>CPFA0A9</b></dt>
|
|
<dd>Object not found. Object is &1.
|
|
</dd>
|
|
<dt><b>CPFA0AA</b></dt>
|
|
<dd>Error occurred while attempting to obtain space.
|
|
</dd>
|
|
<dt><b>CPFA0AB</b></dt>
|
|
<dd>Operation failed for object. Object is &1.
|
|
</dd>
|
|
<dt><b>CPFA0AD</b></dt>
|
|
<dd>Function not supported by file system.
|
|
</dd>
|
|
<dt><b>CPFA0B1</b></dt>
|
|
<dd>Requested operation not allowed. Access problem.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#MD.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
</body>
|
|
</html>
|