4.15.2 Change file or directory access permissions
Function
This plug-in changes the access permissions of the specified file or directory on a UNIX execution-target server.
This plug-in assumes you are using the following server:
- Execution-target server
The server on which this plug-in is to be executed.
The script in this plug-in executes the following processing:
- Executes the following command:
chmod
[-R]#
<access-permission-value> ' common.permission property
<target-file-name> ' common.targetFileName property
Note: This option is set if "true" is set for the common.recursive property, which specifies whether to change the permissions recursively.
For details about the chmod command, see the information that is output by executing the man command of the OS.
Use situation
You can use this plug-in to set access permissions for files or directories.
Prerequisites
For the most recent information about the prerequisite products for the system, prerequisite products for the execution-target server, and the supported OSs for the execution-target server, see the release notes.
[Prerequisite products for the system]
JP1/Automatic Operation 11-00 or later
[Prerequisite products for the execution-target server]
None.
[Supported OSs for the execution-target server]
(1) Red Hat Enterprise Linux Server 6 (32-bit x86), Red Hat Enterprise Linux Server 6 (64-bit x86_64)
(2) Red Hat Enterprise Linux Server 7 (64-bit x86_64)
(3) Red Hat Enterprise Linux Server 8 (64-bit x86_64)
(4) CentOS 6 (64-bit x86_64)
(5) CentOS 7 (64-bit x86_64)
(6) CentOS 8 (64-bit x86_64)
(7) Oracle Linux 8 (64-bit x86_64)
[Conditions for using the execution-target server]
(1) Files and directories for which access permissions will be set must exist.
Cautions
(1) Do not use the following characters for the file name of the access permission setting target (the common.targetFileName property): left angle brackets (<), right angle brackets (>), vertical bars (|), semicolons (;), ampersands (&), asterisks (*), question marks (?), double quotation marks ("), percent signs (%), single quotation marks ('), left square brackets ([), right square brackets (]), or grave accent marks (`).
(2) This plug-in is intended for normal files and folders. Therefore, it does not handle devices as files or directories.
Version
02.01.00
Plug-in tags
Control OS,Linux
Plug-in name displayed in the task log
osSetPermissionUNIX
Return code
0: Normal
12: Error (mistake by the user): A property is invalid.
27: Error (Check the details on the error in the task log.)
41: Error (An error was detected in the component.): A property was not entered. (An error was detected in the component script.)
Property list
The following table lists the properties:
Property key |
Property name |
Description |
Default value |
I/O type |
Required |
---|---|---|---|---|---|
plugin.destinationHost |
Host name of the execution target server |
Specify the host name or IP address of the server on which this plugin will be executed. IPv6 addresses are not supported. |
-- |
Input |
R |
common.targetFileName |
File to which access permissions are set |
Specify the full path to the file or directory for which you want to change access permissions. |
-- |
Input |
R |
common.permission |
Permission of files or directories |
Specify the permission value to change the file or directory access permissions. |
-- |
Input |
R |
common.recursive |
Recursion |
Specify "true" to recursively process directories. Specify a value other than "true" to not recursively process directories. |
-- |
Input |
O |
common.returnValue |
Return value for the plugin |
The return value of this plugin stored. |
-- |
Output |
O |