ibm-information-center/dist/eclipse/plugins/i5OS.ic.cl_5.4.0.1/chgpgp.htm

512 lines
21 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Change Primary Group (CHGPGP)</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="CHGPGP.Top_Of_Page"></a>
<h2>Change Primary Group (CHGPGP)</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="#CHGPGP.PARAMETERS.TABLE">Parameters</a><br>
<a href="#CHGPGP.COMMAND.EXAMPLES">Examples</a><br>
<a href="#CHGPGP.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="CHGPGP"></a>
<p>The Change Primary Group (CHGPGP) command changes the primary group of an object or group of objects from one user to another. An object name pattern can be used to change authority for a group of related objects. The owner's and other user's private authorities to the object do not change.
</p>
<p>The CHGPGP command can also be used to change the primary group of a directory tree where the directory, its contents, and the contents of all of its subdirectories are to have the primary group changed. If SUBTREE(*ALL) is specified, this command will attempt to change the primary group of all objects within the subtree. A diagnostic message will be sent for each object that could not have its primary group changed, and when all of the objects have been attempted, an escape message will be sent. If all of the objects had their primary group changed with no errors, a completion message will be sent.
</p>
<p>If a symbolic link object is encountered, either specified in the <b>Object (OBJ)</b> parameter or encountered in the processing of a subtree, the value specified for the <b>Symbolic link (SYMLNK)</b> parameter will be applied to that symbolic link object. If processing a subtree, the processing of that branch of the subtree then stops because a symbolic link object itself cannot have subtrees.
</p>
<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>
<ul>
<li>To change the primary group of an object in the QSYS.LIB or independent ASP QSYS.LIB file system, you must have all of the following:
<ul>
<li>Object existence (*OBJEXIST) authority for the object
</li>
<li>Object operational (*OBJOPR) and *OBJEXIST authorities if the object is a file, library, or subsystem description
</li>
<li>All object (*ALLOBJ) special authority, or ownership, if the object is an authorization list
</li>
<li>Object management (*OBJMGT) authority, and the authorities to be revoked, for the object if revoking the authority for the old primary group
</li>
<li>*OBJMGT authority for the object and the authorities to be given if a value other than *PRIVATE is specified for the DTAAUT parameter
</li>
</ul>
</li>
<li>The new primary group user cannot be the owner of the object.
</li>
<li>When doing subtree processing, you must have read (*R) and execute (*X) authorities to the path name and all subdirectories within that path.
</li>
</ul>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGPGP.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="CHGPGP.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="#CHGPGP.OBJ"><b>OBJ</b></a></td>
<td valign="top">Object</td>
<td valign="top"><i>Path name</i></td>
<td valign="top">Required, Positional 1</td>
</tr>
<tr>
<td valign="top"><a href="#CHGPGP.NEWPGP"><b>NEWPGP</b></a></td>
<td valign="top">New primary group</td>
<td valign="top"><i>Name</i>, *NONE</td>
<td valign="top">Required, Positional 2</td>
</tr>
<tr>
<td valign="top"><a href="#CHGPGP.DTAAUT"><b>DTAAUT</b></a></td>
<td valign="top">New data authorities</td>
<td valign="top"><b><u>*OLDPGP</u></b>, *PRIVATE, *RWX, *RX, *RW, *WX, *R, *W, *X, *EXCLUDE, *NONE</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CHGPGP.OBJAUT"><b>OBJAUT</b></a></td>
<td valign="top">New object authorities</td>
<td valign="top">Single values: <b><u>*NONE</u></b>, *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="#CHGPGP.RVKOLDAUT"><b>RVKOLDAUT</b></a></td>
<td valign="top">Revoke current authority</td>
<td valign="top">*NO, <b><u>*YES</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CHGPGP.SUBTREE"><b>SUBTREE</b></a></td>
<td valign="top">Directory subtree</td>
<td valign="top"><b><u>*NONE</u></b>, *ALL</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CHGPGP.SYMLNK"><b>SYMLNK</b></a></td>
<td valign="top">Symbolic link</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="#CHGPGP.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="CHGPGP.OBJ"></a>
<h3>Object (OBJ)</h3>
<p>Specifies the object, or a pattern to match multiple objects, for which the primary group is to be changed.
</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>This is a required parameter.
</p>
<dl>
<dt><b><i>path-name</i></b></dt>
<dd>Specify the path name of the objects whose primary group is to be changed.
<p>The object path name can be either a simple name or a name that is qualified with the name of the directory in which the object is located. A pattern can be specified in the last part of the path name. An asterisk (*) matches any number of characters and a question mark (?) matches a single character. If the path name is qualified or contains a pattern, it must be enclosed in apostrophes.
</p>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGPGP.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CHGPGP.NEWPGP"></a>
<h3>New primary group (NEWPGP)</h3>
<p>Specifies the user who is to be the new primary group for the object. The user profile must already exist when this command is run, and must have a group identifier (or <b>gid</b>) assigned to it.
</p>
<p>This is a required parameter.
</p>
<dl>
<dt><b>*NONE</b></dt>
<dd>The object does not have a primary group.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the user profile who is to be the new primary group for the object.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGPGP.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CHGPGP.DTAAUT"></a>
<h3>New data authorities (DTAAUT)</h3>
<p>Specifies which of the data authorities the new primary group has to the object.
</p>
<dl>
<dt><b><u>*OLDPGP</u></b></dt>
<dd>The new primary group has whatever authority the old primary group had to the object.
</dd>
<dt><b>*PRIVATE</b></dt>
<dd>The new primary group has the private authority that the user has to the object. If the user that is the new primary group does not have private authority to the object, the new primary group has no authority to the object.
</dd>
<dt><b>*RWX</b></dt>
<dd>The new primary group has object operational and all of the data authorities to the object.
</dd>
<dt><b>*RX</b></dt>
<dd>The new primary group has object operational and data read and execute authorities to the object.
</dd>
<dt><b>*RW</b></dt>
<dd>The new primary group has object operational and data read, add, update, and delete authorities to the object.
</dd>
<dt><b>*WX</b></dt>
<dd>The new primary group has object operational and data add, update, delete, and execute authorities to the object.
</dd>
<dt><b>*R</b></dt>
<dd>The new primary group has object operational and data read authorities to the object.
</dd>
<dt><b>*W</b></dt>
<dd>The new primary group has object operational and data add, update, and delete authorities to the object.
</dd>
<dt><b>*X</b></dt>
<dd>The new primary group has object operational and data execute authorities to the object.
</dd>
<dt><b>*EXCLUDE</b></dt>
<dd>The new primary group has exclude authority to the object.
</dd>
<dt><b>*NONE</b></dt>
<dd>The new primary group does not have any of the data authorities to the object.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGPGP.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CHGPGP.OBJAUT"></a>
<h3>New object authorities (OBJAUT)</h3>
<p>Specifies which of the object authorities the new primary group has to the object.
</p>
<p><b>Single values</b>
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>None of the other object authorities (existence, management, alter, or reference) are given to the new primary group. If *OLDPGP, *PRIVATE, or *EXCLUDE are specified for the DTAAUT parameter, this value must be specified.
</dd>
<dt><b>*ALL</b></dt>
<dd>All of the other object authorities (existence, management, alter, and reference) are given to the new primary group.
</dd>
</dl>
<p><b>Other values (up to 4 repetitions)</b>
</p>
<dl>
<dt><b>*OBJEXIST</b></dt>
<dd>The new primary group has object existence authority to the object.
</dd>
<dt><b>*OBJMGT</b></dt>
<dd>The new primary group has object management authority to the object.
</dd>
<dt><b>*OBJALTER</b></dt>
<dd>The new primary group has object alter authority to the object.
</dd>
<dt><b>*OBJREF</b></dt>
<dd>The new primary group has object reference authority to the object.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGPGP.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CHGPGP.RVKOLDAUT"></a>
<h3>Revoke current authority (RVKOLDAUT)</h3>
<p>Specifies whether the authorities for the current primary group are revoked when the primary group is changed to the user specified for the <b>New primary group (NEWPGP)</b> parameter.
</p>
<dl>
<dt><b><u>*YES</u></b></dt>
<dd>The authorities for the current primary group are revoked when the primary group is changed to the other user.
</dd>
<dt><b>*NO</b></dt>
<dd>The authorities for the current primary group become a private authority when the primary group is changed to the other user.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGPGP.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CHGPGP.SUBTREE"></a>
<h3>Directory subtree (SUBTREE)</h3>
<p>Specifies whether or not to change the objects within the subtree if the object specified by the <b>Object (OBJ)</b> parameter is a directory or a library.
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>The objects specified by the OBJ parameter are changed. If the object is a directory or a library, it will be changed, but the directory or library contents will not be changed.
</dd>
<dt><b>*ALL</b></dt>
<dd>The objects specified by the OBJ parameter are changed. If the object is a directory or a library, it will be changed as well as the contents of the directory or library and the contents of all subdirectories.
<p>
<b>Note: </b>Pattern matching from the OBJ parameter only applies to the first level objects. If the first level object is a directory or a library, the pattern matching does not apply to the directory or library contents or the contents of the subdirectories.
</p>
<p>
<b>Note: </b>This command may run a long time when SUBTREE(*ALL) is specified if there are many subdirectories to be processed.
</p>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGPGP.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CHGPGP.SYMLNK"></a>
<h3>Symbolic link (SYMLNK)</h3>
<p>If the object is a symbolic link, specifies whether or not to change the symbolic link or the object pointed to by the symbolic link.
</p>
<dl>
<dt><b><u>*NO</u></b></dt>
<dd>The symbolic link object is not changed. The object pointed to by the symbolic link is changed.
</dd>
<dt><b>*YES</b></dt>
<dd>If the object is a symbolic link, the symbolic link is changed. The object pointed to by the symbolic link is not changed.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGPGP.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="CHGPGP.COMMAND.EXAMPLES">Examples</a> </h3>
<p><b>Example 1: Changing the primary group of a program</b>
</p>
<p>
<pre>
CHGPGP OBJ('/QSYS.LIB/USERLIB.LIB/PROGRAM1.PGM') NEWPGP(ANN)
</pre>
</p>
<p>This command changes the primary group of the program named PROGRAM1, located in the user library named USERLIB, to the group named ANN. The new primary group will have the same authority as the old primary group. The old primary group's authority is revoked.
</p>
<p><b>The following examples use the chart below:</b>
</p>
<p>
<pre>
* sym1 (symbolic link to dir1)
*
*
* dir1
* * * *
* * * *
* * * *
* dir2.1 dir2.2 dir2.3
* * * *
* * * *
* dir3.1 dir3.2 sym3.3 (symbolic link to dirA)
*
*
* dirA
* * * *
* * * *
* * * *
* dirB.1 dirB.2 dirB.3
*
</pre>
</p>
<p><b>Example 2: Changing the primary group of a symbolic link when SYMLNK(*NO)</b>
</p>
<p>
<pre>
CHGPGP OBJ('/sym1') NEWPGP(SAM) SUBTREE(*ALL) SYMLNK(*NO)
</pre>
</p>
<p>This command will first determine if there are subtrees to process. Since the object specified in the OBJ parameter is a symbolic link, the SUBTREE parameter will be ignored because a symbolic link object does not have subtrees. Next, the object pointed to by symbolic link sym1 (dir1) will be changed because the SYMLNK parameter specifies that the symbolic link object not be changed.
</p>
<p>In this example, the primary group of dir1 is changed to SAM and he will have the same authority as the old primary group. The old primary group's authority is revoked. It does not change the primary group of the symbolic link object (sym1) and it does not change the primary group of the contents of dir1.
</p>
<p><b>Example 3: Changing the primary group of a symbolic link when SYMLNK(*YES)</b>
</p>
<p>
<pre>
CHGPGP OBJ('/sym1') NEWPGP(JOE) SUBTREE(*ALL) SYMLNK(*YES)
</pre>
</p>
<p>This command will first determine if there are subtrees to process. Since the object specified in the OBJ parameter is a symbolic link, the SUBTREE parameter will be ignored because a symbolic link object does not have subtrees. Next, the symbolic link object (sym1) will be changed because the SYMLNK parameter specifies that the symbolic link object be changed.
</p>
<p>In this example, the primary group of sym1 is changed to JOE and he will have the same authority as the old primary group. The old primary group's authority is revoked. It does not change the primary group of the object pointed to by the symbolic link (dir1) and it does not change the primary group of the contents of dir1.
</p>
<p><b>Example 4: Changing the primary group of a directory when SUBTREE(*ALL) and SYMLNK(*NO)</b>
</p>
<p>
<pre>
CHGPGP OBJ('/dir1') NEWPGP(PETE) SUBTREE(*ALL) SYMLNK(*NO)
</pre>
</p>
<p>This command will first determine if there are subtrees to process. Since the object specified in the OBJ parameter is a directory, the subtrees will be processed. When the processing of the tree encounters a *SYMLNK object, the value for the SYMLNK parameter will be applied to that *SYMLNK object. When the SYMLNK parameter is *NO, the object the symbolic link points to will be changed. The processing of that branch of the tree then stops because the *SYMLNK object itself does not have a subtree.
</p>
<p>In this example, the primary group of dir1, dir2.1, dir2.2, dir2.3, dir3.1, dir3.2, dirA is changed to PETE and he will have the same authority as the old primary group. The old primary group's authority is revoked. The primary group of sym3.3, dirB.1, dirB.2, dirB.3 is not changed.
</p>
<p><b>Example 5: Changing the primary group of a directory when SUBTREE(*ALL) and SYMLNK(*YES)</b>
</p>
<p>
<pre>
CHGPGP OBJ('/dir1') NEWPGP(GEORGE) SUBTREE(*ALL) SYMLNK(*YES)
</pre>
</p>
<p>This command will first determine if there are subtrees to process. Since the object specified in the OBJ parameter is a directory, the subtrees will be processed. When the processing of the tree encounters a *SYMLNK object, the value for the SYMLNK parameter will be applied to the *SYMLNK object. When the SYMLNK parameter is *YES, the symbolic link object will be changed. The processing of that branch of the tree then stops because the *SYMLNK object itself does not have a subtree.
</p>
<p>In this example, the primary group of dir1, dir2.1, dir2.2, dir2.3, dir3.1, dir3.2, sym3.3 is changed to GEORGE and he will have the same authority as the old primary group. The old primary group's authority is revoked. The primary group of dirA, dirB.1, dirB.2, dirB.3 is not changed.
</p>
<p><b>Example 6: Changing the primary group of a directory when SUBTREE(*NONE) and SYMLNK(*NO)</b>
</p>
<p>
<pre>
CHGPGP OBJ('/dir1') NEWPGP(BETTY) SUBTREE(*NONE) SYMLNK(*NO)
</pre>
</p>
<p>This command will not process subtrees. Since the object specified in the OBJ parameter is not a symbolic link, the SYMLNK parameter will be ignored.
</p>
<p>The primary group of dir1 is changed to BETTY. The old primary group's authority is revoked.
</p>
<p><b>NOTE:</b>
</p>
<p>The only way to change dirB.1, dirB.2, and dirB.3 is to specify them individually in the OBJ parameter of the change command, or to specify the change command with OBJ(dirA) and SUBTREE(*ALL).
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGPGP.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="CHGPGP.ERROR.MESSAGES">Error messages</a> </h3>
<p><b><u>*ESCAPE Messages</u></b>
</p>
<dl>
<dt><b>CPE3101</b></dt>
<dd>A non-recoverable I/O error occurred.
</dd>
<dt><b>CPE3408</b></dt>
<dd>The address used for an argument was not correct.
</dd>
<dt><b>CPE3418</b></dt>
<dd>Possible APAR condition or hardware failure.
</dd>
<dt><b>CPE3474</b></dt>
<dd>Unknown system state.
</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 &amp;1.
</dd>
<dt><b>CPFA0AD</b></dt>
<dd>Function not supported by file system.
</dd>
<dt><b>CPFA0A2</b></dt>
<dd>Information passed to this operation was not valid.
</dd>
<dt><b>CPFA0A3</b></dt>
<dd>Path name resolution causes looping.
</dd>
<dt><b>CPFA0A4</b></dt>
<dd>Too many open files for process.
</dd>
<dt><b>CPFA0A7</b></dt>
<dd>Path name too long.
</dd>
<dt><b>CPFA0A9</b></dt>
<dd>Object not found. Object is &amp;1.
</dd>
<dt><b>CPFA0B1</b></dt>
<dd>No objects satisfy request.
</dd>
<dt><b>CPFA0C1</b></dt>
<dd>CCSID &amp;1 not valid.
</dd>
<dt><b>CPFA0CE</b></dt>
<dd>Error occurred with path name parameter specified.
</dd>
<dt><b>CPFA0DD</b></dt>
<dd>Function was interrupted.
</dd>
<dt><b>CPFA0D4</b></dt>
<dd>File system error occurred. Error number &amp;1.
</dd>
<dt><b>CPFA08B</b></dt>
<dd>Path name cannot begin with *.
</dd>
<dt><b>CPFA08C</b></dt>
<dd>Pattern not allowed in path name directory.
</dd>
<dt><b>CPFA085</b></dt>
<dd>Home directory not found for user &amp;1.
</dd>
<dt><b>CPFA086</b></dt>
<dd>Matching quote not found in path name.
</dd>
<dt><b>CPFA087</b></dt>
<dd>Path name contains null character.
</dd>
<dt><b>CPFA088</b></dt>
<dd>Path name pattern not valid.
</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 &amp;1.
</dd>
<dt><b>CPFA09D</b></dt>
<dd>Error occurred in program &amp;1.
</dd>
<dt><b>CPFA09E</b></dt>
<dd>Object in use. Object is &amp;1.
</dd>
<dt><b>CPFA091</b></dt>
<dd>Pattern not allowed in user name.
</dd>
<dt><b>CPFA092</b></dt>
<dd>Path name not converted.
</dd>
<dt><b>CPFA094</b></dt>
<dd>Path name not specified.
</dd>
<dt><b>CPFBC50</b></dt>
<dd>Path name or path names not found.
</dd>
<dt><b>CPF220B</b></dt>
<dd>New primary group &amp;1 does not have a gid.
</dd>
<dt><b>CPF2204</b></dt>
<dd>User profile &amp;1 not found.
</dd>
<dt><b>CPF2213</b></dt>
<dd>Not able to allocate user profile &amp;1.
</dd>
<dt><b>CPF2217</b></dt>
<dd>Not authorized to user profile &amp;1.
</dd>
<dt><b>CPF223A</b></dt>
<dd>&amp;1 objects changed, &amp;2 objects not changed.
</dd>
<dt><b>CPF22F0</b></dt>
<dd>Unexpected errors occurred during processing.
</dd>
<dt><b>CPF3BF6</b></dt>
<dd>Path Type value is not valid.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGPGP.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>