+

Search Tips | Advanced Search

commandPath MFT property

Use the commandPath property to specify the locations that Managed File Transfer can run commands from. Take extreme care when you set this property because any command in one of the specified commandPaths can effectively be called from a remote client system that is able to send commands to the agent.

We can specify a command to be run on the system where the agent is running from the managed transfer and managed call functions of Managed File Transfer. See Program invocation for information. However, commands must be on paths referenced by the commandPath agent property.

If the command specified is not fully qualified, Managed File Transfer attempts to find a matching command on the command path. If there is more than one matching command on the command path, the first match is used.

By default, the commandPath property is empty so that the agent cannot call any commands.

Specify the commandPath agent property as follows:
commandPath=command_directory_name 
separator...command_directory_name
Or for z/OS® only, specify:
commandPath=command_directory_name_or_data_set_name_prefix 
separator...command_directory_name_or_data_set_name_prefix
where:

For example, on a UNIX system if you want to run commands that are located in the directories /home/user/cmds1 and /home/user/cmds2, set the commandPath agent property as follows:

commandPath=/home/user/cmds1:/home/user/cmds2
For example, on a Windows system if you want to run commands that are located in the directories C:\File Transfer\commands and C:\File Transfer\agent commands, set the commandPath agent property as follows:
commandPath=C:\\File Transfer\\commands;C:\\File Transfer\\agent commands
On a Windows system the separator character, backslash (\), must be escaped and be entered as a double backslash (\\). The backslash character (\) can also be replaced with a forward slash (/). For example, on z/OS if you want to run commands that are:

set the commandPath agent property as follows:
commandPath=/home/user/cmds1:/home/user/cmds2://'USER.CMD1'://CMD2://'USER.CMDS()'
Important: Extreme care must be taken when you set this property, because any command in one of the specified commandPaths can be called from a remote client system that is able to send commands to the agent. For this reason, by default, when you specify a commandPath, sandboxing is configured so that all commandPath directories (and their subdirectories) are automatically denied access for a transfer:

We can override this behavior for compatibility with the following releases:

We can override this behavior by adding the following property to the agent.properties file:
addCommandPathToSandbox=false

When the addCommandPathToSandbox property is present and set to false, the following behavior occurs: