Setting Up Pre/Post Processing
Your Aspera server can execute a shell script from a pre-defined location:
The script is executed as a result of four transfer events:
- Session start
- Session end
- Start of each individual file transfer in the session
- End of each individual file transfer in the session
The aspera-prepost script can also execute additional shell scripts, Perl scripts, native executables, and Java programs. Aspera sets several environment variables for aspera-prepost that you can use in your own custom scripts. These environment variables are described in detail in Pre/Post Variables. Depending on usage, pre- and post-processing may consume a large amount of system resources. Be sure to evaluate your system performance and apply this feature appropriately.
CAUTION:
When creating pre- and post-processing scripts, unsafe scripts can
compromise a server. As with CGI scripts, you should take precautions in testing a
pre/post script before placing it into use (such as taint checking and ensuring
proper quotes). You should also be aware of user permissions; pre/post scripts run
as the user who authenticates the transfer. To prevent a pre/post script from
performing an action with elevated or special user permissions, the script needs to
check the $USER variable.
Follow the steps below to set up pre/post processing for your Aspera transfer product: