Command reference / ifs

CHGAUT

Change Authority

Updates data or object authorities for users on IFS objects. The selection can use a path pattern or include a directory subtree.

Allowed environments: *ALL. Positional parameters: 4.

Parameters

OBJ Object

Sets the object, or a pattern to match multiple objects, for which specific authorities are to be given to one or more users or to an authorization list.

Type
*CHAR
Required
Yes
Length
5000
Case
Mixed case
path-name
Enter the path name of the objects for which specific authorities are to be changed.

USER User

Sets the users for whom authorities to the objects specified for the Object (OBJ) parameter are to be changed. If user names are specified, the authorities are changed specifically for those users. Note: Either this parameter or the Authorization list (AUTL) parameter must be specified.

Type
*NAME
Required
No
Length
10
List limit
50
Case
Uppercase

Suggested / special values: *PUBLIC

*PUBLIC
All users who do not have authority specifically given to them for the object, who are not on the authorization list, whose user group does not have any authority, or whose user group is not on the authorization list, are authorized to use the object as specified for the New data authorities (DTAAUT) and New object authorities (OBJAUT) parameters.
name
Enter the user profile name of the user who you want to have specific authority for the object. Up to 50 user profile names can be specified.

DTAAUT New data authorities

Sets the data authorities to be given to the users specified for the User (USER) parameter. If a value other than *SAME is specified, the value replaces any data authorities that the users currently have to the objects.

Type
*CHAR
Required
No
Default
*SAME
Length
8
Case
Uppercase

Allowed values: *SAME, *NONE, *RWX, *RX, *RW, *WX, *R, *W, *X, *EXCLUDE, *AUTL

*SAME
The users' data authorities to the objects do not change.
*NONE
The users do not have any of the data authorities to the objects.
*RWX
The users are given *RWX authority to the objects.
*RX
The users are given *RX authority to 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.
*RW
The users are given *RW authority to view the contents of an object and change the contents of an object. *RW authority provides object operational authority and data read, add, update, and delete authorities.
*WX
The users are given *WX authority to change the contents of an object and run a program or search a library or directory. *WX authority provides object operational authority and data add, update, delete, and execute authorities.
*R
The users are given *R authority to view the contents of an object. *R authority provides object operational authority and data read authority.
*W
The users are given *W authority to change the contents of an object. *W authority provides object operational authority and data add, update, and delete authorities.
*X
The users are given *X authority to run a program or search a library or directory. *X authority provides object operational authority and data execute authority.
*EXCLUDE
Exclude authority prevents the user from accessing the object.
*AUTL
The public authority of the authorization list specified in the AUTL parameter is used for the public authority for the object.

OBJAUT New object authorities

Sets the object authorities to be given to the users specified for the User (USER) parameter. If a value other than *SAME is specified, the value replaces any object authorities (*OBJEXIST, *OBJMGT, *OBJALTER, and *OBJREF) that the users currently have to the objects.

Type
*CHAR
Required
No
Default
*SAME
Length
9
List limit
4
Case
Uppercase

Allowed values: *SAME, *NONE, *ALL, *OBJEXIST, *OBJMGT, *OBJALTER, *OBJREF

*SAME
The users' object authorities to the objects do not change.
*NONE
The users do not have any other object authorities (existence, management, alter, or reference). If *EXCLUDE or *AUTL is specified for the DTAAUT parameter, this value must be specified.
*ALL
All of the other object authorities (existence, management, alter, and reference) are given to the users.
*OBJEXIST
The users are given object existence authority to the object.
*OBJMGT
The users are given object management authority to the object.
*OBJALTER
The users are given object alter authority to the object.
*OBJREF
The users are given object reference authority to the object.

AUTL Authorization list

Sets the authorization list whose users are to be given authority to the objects specified for the Object (OBJ) parameter. Note: Either this parameter or the Users (USER) parameter must be specified. If this parameter is specified, the DTAAUT and OBJAUT parameters are ignored.

Type
*NAME
Required
No
Length
10
Case
Uppercase

Suggested / special values: *NONE

*NONE
The current authorization list is removed from the object.
name
Enter the name of the authorization list to be used to secure the object. If the object is currently secured by an authorization list, the specified authorization list will now be used to secure the object.

SUBTREE Directory subtree

Choose whether to change the objects within the subtree if the object specified by the Object (OBJ) parameter is a directory or a library.

Type
*CHAR
Required
No
Default
*NONE
Length
5
Case
Uppercase

Allowed values: *NONE, *ALL

*NONE
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.
*ALL
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.

SYMLNK Symbolic link

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.

Type
*CHAR
Required
No
Default
*NO
Length
4
Case
Uppercase

Allowed values: *NO, *YES

*NO
Keep the current symbolic link object. The object pointed to by the symbolic link is changed.
*YES
If the object is a symbolic link, the symbolic link is changed. The object pointed to by the symbolic link is not changed.

Examples

CHGAUT OBJ('/QSYS.LIB/USERLIB.LIB/PROGRAM1.PGM') USER(*PUBLIC) DTAAUT(*RW)

Gives authority to use and change the object named PROGRAM1 to all users of the system who do not have authorities specifically given to them, who are not on an authorization list, whose user groups do not have authority to the object, or whose user groups are not on the authorization list.

CHGAUT OBJ('/QSYS.LIB/MYLIB.LIB/PRGM3.PGM') AUTL(KLIST)

Gives to users the authority specified for them on authorization list KLIST for the object named PRGM3. The object is a program located in library MYLIB. The following examples use the chart below:

CHGAUT OBJ('/sym1') USER(JOEUSER) DTAAUT(*RX) SUBTREE(*ALL) SYMLNK(*NO)

Will first determine if there are subtrees to process.

CHGAUT OBJ('/sym1') USER(JOEUSER) DTAAUT(*R) OBJAUT(*OBJMGT) SUBTREE(*ALL) SYMLNK(*YES)

Will first determine if there are subtrees to process.

CHGAUT OBJ('/dir1') USER(JOEUSER) DTAAUT(*R) OBJAUT(*OBJMGT) SUBTREE(*ALL) SYMLNK(*NO)

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.

CHGAUT OBJ('/dir1') USER(JOEUSER) DTAAUT(*R) OBJAUT(*OBJMGT) SUBTREE(*ALL) SYMLNK(*YES)

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.

CHGAUT OBJ('/dir1') USER(JOEUSER) DTAAUT(*R) OBJAUT(*OBJMGT) SUBTREE(*NONE) SYMLNK(*NO)

Will not process subtrees.

IBM command documentation

Generated from os/cl/catalog/CHGAUT.json and os/cl/help/CHGAUT.json.