New “Send a File” feature in Cerberus FTP Server 11.2

We’ve introduced a highly requested new Transfer File Target in Event Manager that allows transferring files to other servers via SFTP, FTP, FTPS, or HTTP/S PUT in Cerberus FTP Server 11.2 Enterprise.

While it’s been possible to send files using the “Launch an Executable” Event Rule Action for some time, you had to install or build your own executable (typically cURL.exe) in order to do so. Furthermore, logging and error messages were often difficult to capture.

With this new feature, we have integrated functionality making it easy to send a file and capture any messages directly within Cerberus.

Example Scenario

1.) To use the new functionality, start by creating a new Event Target and selecting “Transfer File Target.” See the ‘Adding a New Transfer File Event Target’ screenshot  below

add a new event target
Adding a New Transfer File Event Target

2.) Next, add information describing the server in the Transfer File Target panel. Refer to ‘The Transfer File Event Target’ screenshot

Start by selecting the Protocol you want to use. Currently, we support FTP, FTPS, SFTP, and HTTP/S PUT. Depending on the selected Protocol, certain options are available. For example, when FTP is selected, you can force upgrading to encrypted SSL channels by clicking Require SSL. When checked, Verify Remote Certificate will ensure that the host’s certificate and peer chain are valid; this option is available whenever a SSL channel is used, but not for unencrypted FTP or SFTP.

The Server and optional Path settings tell the system which server to contact and where to send the file. Username is always required while Password is optional (in the case that you are using Certificates/Public Key). Certificates should be in PEM format while Public Key files should be in SSH Public Key Format; Private Keys should be in PEM format. If the private key is encrypted, check the Needs Key Password setting and enter the password. It is possible to use both username/password and certificates/public key to provide two-factor authentication. Please note, each server may handle client certificates differently, but often the username must match the certificate CN.

Clicking the Test button will verify that Cerberus is able to connect to the server and login; it doesn’t actually transfer a file, but it’s a good starting point for verifying that your Target is configured properly.

If you have problems connecting, go to the Log screen in the user interface, enable Debug Mode by clicking on the ‘bug’ icon, and test again. The log will now have detailed information about the connection and may provide some clues (ie. warnings/error messages) as to what changes you need to make to successfully complete the connection.

Transfer File Event Target
The Transfer File Event Target

3.) Once you can connect to your server, click Update and move on to the “Event Rules”. There are many customizable options here, but for this demo, we’ll just assume you want to transfer a file in response to an incoming “File Transfer Event.” To prevent the system from sending every incoming file, click New button to add a condition and set the Variable to “{{LPNT}} Local File Parent Directory”, Comparison to “Equals” and Value to a new directory like “c:\ftproot\test\uploads” that you create in your path. Click the Add button.

4.) Next, add a new action and select “Send a File” and in the Using drop-down select the Event Target created in the Event Targets step. See the ‘Send a File Event Action’ screenshot

Since we want to send a file that just came in, we can set File Path From to {{LFP}} which is a variable representing the “Local File Path.” And for File Path To, we can select {{LFN}} which is just the filename part of the incoming file.

Clicking “Add” will complete the Rule and show a summary like:
Send file to “ftp://user@example.com/newfolder/{{LFN}}” from “{{LFP}}”

Send a File Event Action
Send a File Event Action

5.) You can now test the transfer by uploading a file to the directory “test\uploads” and verify that it is transferred to the remote server and placed in the “newfolder” directory with the same filename as your original file.

If you have any issues, make sure Debugging is enabled in the Log as discussed above, trigger the transfer and look at the debugging and error messages.

Requirements and Support

Event Support is available in Cerberus FTP Server Enterprise. Please let us know how you use this feature and if any additional protocols or options would be helpful.

Close Cart

Shopping Cart