SolarWinds | Serv-U
Contact Support: 866-530-8040 | Contact Sales: 855-498-4154 or email | Show Flags | Login
Serv-U FTP Server Home Page
The Best for Less
Secure file transfer & share files
from anywhere - affordably

FREE for 14 Days
Full featured trial with secure
FTP, file sharing & web transfer


Information About Passing Command Line Parameters to External Applications  -  KB Article #2160

Related Articles --

In previous Serv-U versions, Serv-U events on Linux that triggered an external application passed the configured command line parameters to the external application as a single argument. This behavior had the result that for an external shell script to work, it was necessary to modify the script so that it could parse the parameters correctly.

Serv-U version 15.1 provides a fix for the original issue, and the configured parameters are now passed to external applications separately.

However, if you used a workaround in your scripts earlier, you must update them, or modify the event parameters so that they will work with Serv-U version 15.1. If you do not modify these, the events triggering external applications with multiple parameters that worked before the upgrade will now seem to be missing parameters in the external application.

The behavior is demonstrated in the following examples, used with the following test script:

# printout the variables passed into us
echo var1 is "$1", var2 is "$2", var3 is "$3" > ./test.log
# exit the script

The following image shows a Serv-U event configured with Command Line Parameters separated by spaces. Each parameter is passed to the script separately, and running the script returns the following result: var1 is one, var2 is two, var3 is three. This is the current Serv-U behavior.

The following image shows a Serv-U event in which the entire field of the Command Line Parameters is enclosed within quotation marks. In this case, only one parameter is passed to the script, and running the script returns the following result: var1 is "one~two~three", var2 is empty, var3 is empty. This mimics the behavior before Serv-U version 15.1.

Note: This only affects Linux events that are configured this way.