Transferring files to or from protocol bridge agents

You can transfer files to and from an FTP or SFTP file server outside your Managed File Transfer network using a protocol bridge agent.

When you transfer files using the protocol bridge, the bridge must have permission to read the source or destination directory containing the files you want to transfer. For example, if you want to transfer files from the directory /home/fte/bridge that has only execute permissions (d--x--x--x), any transfers you attempt from this directory fail with the following error message:
BFGBR0032E: Attempt to read filename from the protocol file server has failed with server error 550
Failed to open file.

During file transfer, files are typically written as temporary files at the destination and are then renamed when the transfer is complete. However, if the transfer destination is a protocol file server that is configured as limited write (users can upload files to the protocol file server but cannot change those uploaded files in any way; effectively users can write once only), transferred files are written to the destination directly. This means that if a problem occurs during the transfer, the partially-written files remain on the destination protocol file server and Managed File Transfer cannot delete or edit these files. In this situation the transfer fails.

Ensure that you have another agent in your Managed File Transfer network in addition to the protocol bridge agent. The protocol bridge agent is a bridge to the FTP or SFTP server only and does not write transferred files to the local disk. If you want to transfer files to or from the FTP or SFTP server you must use the protocol bridge agent as the destination or source for the file transfer (representing the FTP or SFTP server) and another standard agent as the corresponding source or destination.

Managed transfer requests that require a new directory to be created on an SFTP file server

Managed File Transfer protocol bridge agents use the third-party JSch library to communicate with file servers using the SFTP protocol. If the protocol bridge agent attempts to transfer a file into a directory that does not exist on a file server and JSch is unable to perform the requested SFTP operation to create that directory, because the user that the protocol bridge agent logs into the file server with does not have permission to do so, JSch throws an exception back to the protocol bridge agent. The protocol bridge agent then marks the managed transfer as "Failed" and generates a supplementary message. If JSch has provided more information about the failure, the protocol bridge agent includes this information in the supplementary message:
BFGTR0072E:  The transfer failed to complete due to the exception: 
BFGBR0119E: Bridge agent was unable to create directory directory name because message from JSch exception
From IBM® MQ 9.1.0 Fix Pack 5 and IBM MQ 9.1.5, if the JSch exception does not contain any more information about the failure, the protocol bridge agent generates the following supplementary message:
BFGTR0072E:  The transfer failed to complete due to the exception: 
BFGBR0209E: Bridge agent was unable to create directory directory name