File checksum

IN THIS ARTICLE:

Overview

As of Aspera Enterprise Server 3.4, it is possible to have FASP calculate and report the checksum of a full transferred file. This article walks you through the various configuration options available to enable this feature.

Aspera clients and servers have always used checksums internally to compare and verify successful delivery of files and file segments. With the 3.4 release and above, the protocol can report the file checksums through the standard APIs and application interfaces. The FASP checksum is not generated until the last byte of data is successfully transferred to the receiver. The file checksum may be used to verify that file contents on the destination match what was read at the source. File checksum can be computed based on md5 or sha1. 

Environment

  • Product: Enterprise Server, Connect Server, Point to Point
  • Version: 3.4+ (both client and server)
  • Operating System: Windows, Linux, Mac

Enabling checksum

By default, file checksum is turned off. You can enable the feature on the server in any of the following ways: through the GUI, through the command line tool asconfigurator or through Aspera Console. These methods edit the configuration file aspera.conf which you can also edit directly.

via the GUI

Go to Configuration > Global > File Handling. Find File Checksum method and check Override, then set the value to md5, sha1 or any:

GUI_file_checksum.jpg

via asconfigurator

Run the following command, where the last value can be md5, sha1 or any:

asconfigurator -x "set_node_data;file_checksum,md5"

via Console (v.2.0.0 or higher)

Go to Nodes and select edit for a node you want checksums from. Go to Configuration and expand Advanced File Handling. Find File Checksum method, check Override and set the value to either md5 or sha1.

via aspera.conf

Add the <file_checksum> tag to the <file_system> section, which is within the default section. Find File Checksum method and check Override, then set the value to md5, sha1 or any:

<file_system>       
   <file_checksum>md5</file_checksum>
</file_system>      

Obtaining checksums

Once file checksum is enabled on the server, you can obtain the checksum value via Manifest, Pre/Post Process, Aspera Console or ascp.

via Manifest

You can save checksums to a file with the File Manifest option. Prior to transfer, make sure Manifest is enabled on the server. You can set this in the GUI under Configuration > Global > File Handling

Find File Manifest and set the value to text. Underneath, set the path you would like the checksum text files to be saved to for File Manifest Path:

manifest.jpg

 

 In the example provided above, you can find the checksum in a text file under the /tmp directory.

via Pre/Post Process

The Pre/Post environment variable for file checksum is FILE_CSUM. For example, below is a simple server side pre-post script that outputs the file checksum.

#!/bin/bash
if [ $TYPE == File ]; then
if [ $STARTSTOP == Stop ]; then
echo "The file is: $FILE" >> /tmp/p.log
echo "The file Checksum is: $FILE_CSUM" >> /tmp/p.log
chmod 777 $FILE
fi
fi

For more information on how to create a pre-post script, see this article: Setting up and using pre-post processing.

via Console (v.2.0.0 or higher)

To view the checksum of your successfully transferred file, go to Activity and click on a transfer you want to see the checksum for. In the Session Detail page, click on the name of a file to see the checksum:

checksum_console.jpg

 

In addition, you can create your own Console report to obtain file checksum. Go to Reports > Manage Report Types > New Basic and generate your own report.

 

console_report_chk_sum.jpg

via ascp

You can enable checksum reporting on a per transfer session basis with the command line transfer program ascp.

The checksum options for the command are as follows:

  • --file-checksum: Set to md5, sha1 or any
  • --file-manifest: Set to text or none
  • --file-manifest-path: Set to the path where file manifests are to be saved

Below is an example:

ascp --file-checksum=md5 --file-manifest=text --file-manifest-path=/tmp file asp1@189.0.202.39:/destination_path

via aspera.conf

You can also configure manifest files within aspera.conf.

Add the <file_manifest> tag, which should take the value text and <file_manifest_path>, which should be set to the path where manifest files are saved to, in the <file_system> section.

    <file_system>      
        <file_checksum>md5</file_checksum>      
        <file_manifest>text</file_manifest>      
        <file_manifest_path>/tmp/</file_manifest_path>   
    </file_system>

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk