Client Documentation

Start Page 3. Configuration instructions 3.1. General configuration

3.1. General configuration

3.1.1. Configuration procedure

The transfers to be performed by the SFTPPlus Client are configured via transfer definition files, located in /opt/SFTPPlus-client/conf.

Each transfer will monitor a local or remote folder and will either get or put file, according to its own transfer definition configuration file.

A single transfer definition can not handle both get and put transfer. For getting and putting files to a remote partner, you will have to define two separate configuration files (one for the put transfer and another for the get transfer.)

A single transfer definition can not handle multiple protocol type. In case you want to transfer files using multiple protocols (ex. SFTP and FTPS), you will have to define a different configuration file for each protocol.

Warning

A local folder can only be monitored by a single transfer configuration file. If adding multiple transfer definitions, configured to monitor the same local folder, only the first transfer will be active. The other transfers will be disabled and an error message will be logged.

3.1.2. Base configuration options

The following configuration options are the starting point for defining a new transfer and each transfer definition will contain them.

3.1.2.1. disabled

Optional:

Yes

Default value:

‘n’

Values:
  • ‘n’
  • ‘y’
From version:

1.5.1

To version:

None

Description:

Set this valued to 'y' to disable the transfer.

No file transfer operations are performed for disabled configurations.

3.1.2.2. subdir

Optional:

No

Default value:

None

Values:
  • Path to a folder from Inbox.
From version:

1.5.1

To version:

None

Description:

The name of the folder located in the global inbox.

This will be the folder from where files are sent or where files are retrieved.

This is required to be unique among all other configuration files.

3.1.2.3. direction

Optional:

Yes

Default value:

‘put’

Values:
  • ‘get’ - for downloading files.
  • ‘put’ - for uploading files.
From version:

1.5.1

To version:

None

Description:

This configuration describes how transfers are going to be moved between client and server.

A get is a download, files are retrieved from the server into the client.

A put is an upload, files are moved from the client into the server.

3.1.2.4. type

Optional:

No

Default value:

None

Values:
  • ‘sftp’ - ssh2 file transfer.

  • ‘ftp’ - ftp plain.

  • ‘ftps’ - ftp secure (explicit ftp-ssl or ftp-tls).

    Default set in explicit mode. Use ftpsmode for enabling implicit mode.

  • ‘command’ - run a local command.

    In this case direction must be put. Also, for command transfer type, only preprocess command will be executed.

From version:

1.5.1

To version:

None

Description:

The protocol used for transferring files.

3.1.3. Log/Audit entries configuration

By default, SFTPPlus client will store audit entries inside the message.log file located in the installation folder.

Audit entries are emitted based on the following log levels:

  • informational I
  • warning W
  • error E
  • severe/critical error S

Log entries are configured using the message.conf file, located in the installation folder.

3.1.3.1. message.logfile

Optional:

Yes

Default value:

‘message.log’

Values:
  • Custom path where log messages are stored.
From version:

1.5.1

To version:

None

Description:

This can be used for defining a custom path to store the message.log file. Note that log files from previous days will be still archived inside the archive folder.

Note

A file named message.log will always be present in the installation folder. This allows storing events in the log file before reading the configuration file.

3.1.3.2. message.route.I

Optional:

No

Default value:

‘log’

Values:
  • console
  • log
  • eventlog
From version:

1.5.1

To version:

None

Description:

Locations where to send audit logs with ‘Informational’ level. Defined as a comma separated list of any audit message destination. For example to send files to log file and to Windows Event log, define it as: log, eventlog. Windows Event Log is only available for SFTPPlus client running on Windows.

3.1.3.3. message.route.W

Optional:

No

Default value:

‘log, console’

Values:
  • console
  • log
  • eventlog
From version:

1.5.1

To version:

None

Description:

Locations where to send audit logs with ‘Warning’ level. For more details see message.route.I

3.1.3.4. message.route.E

Optional:

No

Default value:

‘log, console, eventlog’

Values:
  • console
  • log
  • eventlog
From version:

1.5.1

To version:

None

Description:

Locations where to send audit logs with ‘Error’ level. For more details see message.route.I

3.1.3.5. message.route.S

Optional:

No

Default value:

‘log, console, eventlog’

Values:
  • console
  • log
  • eventlog
From version:

1.5.1

To version:

None

Description:

Locations where to send audit logs with ‘Server Error’ level. For more details see message.route.I

3.1.3.6. message.prefix

Optional:

No

Default value:

‘SFTPPlus’

Values:
  • Any text which is prefixed for each event message.
From version:

1.5.1

To version:

None

Description:

In case a log destination received events from multiple sources, this can be used to signal files comment from this “SFTPPlus Client” installation.

This is also used as the source name for Windows Event logs.

3.1.4. Define paths relative to the installation folder

Some SFTPPlus Client transfer definition options requires to specify paths to various files located on the local filesystem. For example, this is the case for specifying SSL certificates using the clientcert configuration option.

Let’s say that SFPPlus Client is installed in /opt/SFTPPlus-client/ and we will store the SSL certificates in /opt/SFTPPlus-client/pki.

For configuring the clientcert option with absolute path, we will use:

clientcert = '/opt/SFTPPlus-client/pki/client-cert-and-key.pem'

In the same time, we can use the global.path || placeholder and then configure the path to the SSL certificate, using paths relative the the SFTPPlus Client installation folder (in our case /opt/SFTPPlus-client/).:

clientcert = global.path || 'pki/client-cert-and-key.pem'

Note

When using relative paths, you can change the SFTPPlus Client installation path, without requiring changes in all transfer definition files.