FTP Server Connector

Version 26.2.9619


FTP Server Connector


FTP Server connectors provide connection credentials to access the full-featured CData Arc FTP Server.

Key Capabilities

  • Full-featured embedded FTP server with FTPS (FTP over TLS/SSL) support
  • Multi-client architecture with individual user profiles and directory isolation
  • Configurable permissions for send and receive directories per trading partner
  • Welcome banners, file filtering, and temporary file handling for reliable operations
  • Support for both active and passive modes with configurable port ranges

Overview

The Arc FTP Server is primarily configured on the Profiles page. Then, individual FTP Server connectors provide a unique client profile to authenticate to the FTP Server. The client profile consists of a username (which matches the FTP Server connector’s Connector Id), a password, a set of send and receive directories, and permissions to read and/or write files in these directories.

FTP clients are not given permissions to the root of the FTP Server, which means that FTP clients should always cd into the send (to download) and receive (to upload) directories after connecting.

Video Resources

Watch this short video for an overview of how to configure an FTP Server. The video uses an SFTP Server in the example, but the principles are the same for FTP.

Profile Configuration

The FTP Server Profile must be configured before connections can be established with individual FTP Server connectors. Click Profiles on the navbar, then click the FTP Server tab.

Server Configuration

Server implementation settings.

  • Port The port on which the FTP Server listens for incoming connections.
  • FTP Over TLS How TLS/SSL should be negotiated when clients connect to the server. Choose Explicit to establish a plain text connection where TLS/SSL is then started with an explicit command. Choose Implicit to immediately negotiate TLS/SSL without establishing a plain text connection.
  • Server TLS Certificate The TLS certificate that identifies the server. Only required if the server is operating as an FTPS server (in other words, if TLS/SSL is enabled).
  • Certificate Password The password required to access the Server TLS Certificate.
  • Welcome Message The banner presented to FTP clients when they connect to the server.
  • Root Directory The root directory for the server. Subfolders are created in the root for individual client profiles (in other words, for each configured FTP Server connector). Each client profile includes a Send folder, where clients can download files from the server, and a Receive folder, where clients can upload files to the server.
  • Allowed Files Filter A glob pattern that determines which files are accepted by the FTP server. You can use negative patterns to indicate files that should not be downloaded (for example, -*.tmp). Separate multiple file types by commas (for example, *.x12,*.edi).

Other Settings

Settings that do not fall into the previous category.

  • Active Mode Check this to enable Active mode on the remote FTP server. Keep in mind that Passive mode is less likely to result in firewall interference with the connection.
  • Inactivity Timeout The length of time (in seconds) that must pass without activity for a user to time out.
  • Passive Port Range When using Passive mode, the application uses any available port to listen for incoming data connections. You can override this by setting this field to a port range in start-end format. For example: 1024- refers to ports higher than 1024 (inclusive) and 1024-2048 refers to ports between 1024 and 2048 (inclusive).
  • Passive Address When using Passive mode, the applications returns the IP address for the local interface. You can override this by setting this field to a specific public IP address.
  • TLS Enabled Protocols The list of TLS/SSL protocols supported when establishing outgoing connections. Best practice is to only use TLS protocols. SSL v2 and SSL v3 are considered vulnerable and should only be used if your partner does not support higher versions. Keep in mind that TLS v1.3 is not universally adopted, and might be refused if the destination server does not support it.

Logging

Settings that govern the creation and storage of logs.

  • Log Level The verbosity of logs generated by the connector. When you request support, set this to Debug.
  • Log Rotate Interval The number of days to wait before creating a new log file.
  • Log Delete Interval The number of days to wait before deleting old log files.

Miscellaneous

Miscellaneous settings are for specific use cases.

  • Other Settings Enables you to configure hidden connector settings in a semicolon-separated list (for example, setting1=value1;setting2=value2). Normal connector use cases and functionality should not require the use of these settings.

Connector Settings

Once you configure the FTP Server profile settings, create and configure an individual FTP Server connector for each trading partner on the Flows page.

Settings Tab

Configuration

  • コネクタId コネクタの静的な一意の識別子。
  • コネクタの種類 コネクタ名とその機能の説明が表示されます。
  • コネクタの説明 コネクタとフローにおけるロールについて自由形式の説明を記載するオプションのフィールド。

User Configuration

Credentials for authenticating to the local FTP server.

  • User The username credential for logging in to the local FTP server. This value is always the same as the Connector Id.
  • Password The password credential associated with the User.

Permissions

Settings related to the read and write permissions the configured client has for the Send and Receive folders.

  • Send Directory Permissions Use the checkboxes to set read and write permissions for the Send directory. This directory is where files are downloaded.
  • Receive Directory Permissions Use the checkboxes to set read and write permissions for the Receive directory. This directory is where files are uploaded.

Advanced Tab

Local Folders

Settings related to the folders where clients upload and download files.

  • Input Folder (Send) Files in the Send folder are available to be downloaded by clients.
  • Output Folder (Receive) Files uploaded by the client are placed in the Receive folder. Files remain in the Receive folder or are passed along to the next connector in the flow.

Other Settings

Settings not included in the previous categories.

  • Allowed Files Filter A glob pattern that determines which files are accepted by the FTP server. You can use negative patterns to indicate files that should not be downloaded (for example, -*.tmp). Separate multiple file types by commas (for example, *.x12,*.edi). Overrides the Allowed Files Filter option on the FTP Profile page.
  • Remove File After Send Whether files in the Send folder should be removed after the client receives them.
  • Temp Receive Extensions Files with a matching extension are not recorded in the Receive table and do not fire the After Receive event until they are renamed. Supply a comma-delimited list of file extensions.
  • Timeout The length of time (in seconds) the server waits for a connection response before throwing a timeout error.
  • Save Subfolder Check this to add a SubFolder header to received messages. This header represents the path relative to the Local Folders.
  • ローカルファイルスキーム コネクタがアウトプットするメッセージにファイル名を割り当てるスキーム。ファイル名にマクロを動的に使用して、識別子やタイムスタンプなどの情報を含めることができます。詳しくは、マクロ を参照してください。

Message

Message settings determine how the connector searches for messages and manages them after processing. You can save messages to your Sent folder or you can group them based on a Sent folder scheme, as described below.

  • Sent フォルダに保存 チェックすると、コネクタで処理されたファイルをコネクタのSent フォルダにコピーします。
  • Sent Folder Scheme Instructs the connector to group files in the Sent folder according to the selected interval. For example, the Weekly option instructs the connector to create a new subfolder each week and store all sent files for the week in that folder. The blank setting instructs the connector to save all files directly in the Sent folder. For connectors that process many transactions, using subfolders can help keep files organized and improve performance.

Logging

Settings that govern the creation and storage of logs.

  • Log Level The verbosity of logs generated by the connector. When you request support, set this to Debug.
  • Log Subfolder Scheme Instructs the connector to group files in the Logs folder according to the selected interval. The Weekly option (which is the default) instructs the connector to create a new subfolder each week and store all logs for the week in that folder. Leaving this setting blank tells the connector to save all logs directly in the Logs folder. For connectors that process many transactions, using subfolders helps keep logs organized and improves performance.
  • Log Messages Check this to have the log entry for a processed file include a copy of the file itself. If you disable this, you might not be able to download a copy of the file from the Transactions tab.

Miscellaneous

Miscellaneous settings are for specific use cases.

  • Other Settings Enables you to configure hidden connector settings in a semicolon-separated list (for example, setting1=value1;setting2=value2). Normal connector use cases and functionality should not require the use of these settings.

アラートタブ

アラートの設定に関連する設定.

サービスレベル(SLA)を実行する前に、通知用のE メールアラートを設定する必要があります。デフォルトでは、Arc はアラートタブのグローバル設定を使用します。このコネクタに他の設定を使用するには、グローバル設定をオーバーライドをON にしてください。

デフォルトでは、エラーアラートが有効になっています。これはエラーが発生するたびにE メールが送信されることを意味します。アラートをオフにするには、有効化チェックボックスのチェックを外します。

件名(必須)を入力し、オプションでE メールの受信者のリストをカンマ区切りで入力します。

SLA タブ

サービスレベル(SLA)の設定に関連する設定.

サービスレベルでは、フロー内のコネクタが送受信すると予想される処理量を設定し、その量が満たされると予想される時間枠を設定できます。CData Arc は、サービスレベルが満たされていない場合にユーザーに警告するE メールを送信し、SLA を At Risk(危険) としてマークします。これは、サービスレベルがすぐに満たされない場合に Violated(違反) としてマークされることを意味します。これにより、ユーザーはサービスレベルが満たされていない理由を特定し、適切な措置を講じることができます。At Risk の期間内にサービスレベルが満たされなかった場合、SLA はViolated としてマークされ、ユーザーに再度通知されます。

SLA を定義するには、予想処理量をON にして設定タブをクリックします。

  • コネクタに個別の送信アクションと受信アクションがある場合は、ラジオボタンを使用してSLA に関連する方向を指定します。
  • ウィンドウの検知基準(最小)で:
    • 処理が予想されるトランザクションの最小値(量)に設定します
    • フィールドを使用して期間を指定します
    • SLA がいつ有効になるかを示します。開始日 を選択した場合は、日時フィールドを入力してください。
    • SLA を有効にする曜日のボックスをON にします。必要に応じて、ドロップダウンから毎日を選択します。
  • ウィンドウの期間終了前にステータスを’At Risk’ に設定するタイミングで、SLA がAt Risk としてマークされるタイミングを指定します。
    • デフォルトでは、通知はSLA が違反のステータスになるまで送信されません。これを変更するには、‘At Risk’ 通知を送信のチェックをON にします。

次の例は、月曜日から金曜日まで毎日1000ファイルを受信すると予想されるコネクタに対して構成されたSLA を示しています。1000ファイルが受信されていない場合、期間終了の1時間前にAt Risk 通知が送信されます。

Note:必要に応じてSLA アラートをOFF にすることができます。これはWindows メンテナンス期間中に役立ちます。ナビゲーションバーの設定をクリックし、アラート > 一般的なアラートに移動します。タブレットと鉛筆のアイコンをクリックして編集し、SLA アラート設定のチェックを外します。

Establishing a Connection

Each FTP Server connector represents a single trading partner’s connection parameters. The trading partner should connect to the FTP server using the server settings (such as port and TLS mode) from the Profile page and the user configuration settings in the dedicated FTP Server connector (User and Password).

Each trading partner has separate Send and Receive directories that are subfolders of the root. The partner should download files from the Send folder and upload files to the Receive folder. The client is not permitted to upload or download files from the root.

Macros

ファイルの命名規則にマクロを使用することで、組織の効率とデータの文脈的理解を高めることができます。マクロをファイル名に組み込むことで、識別子、タイムスタンプ、ヘッダー情報などの関連情報を動的に含めることができ、各ファイルに有益なコンテキストを付与できます。これにより、組織にとって重要な詳細をファイル名に反映させることができます。

CData Arc はこれらのマクロをサポートしており、すべて次の構文を使用します:%Macro%

Macro 説明
ConnectorID コネクタのConnectorID を返します。
Ext コネクタが処理中のファイルの拡張子を返します。
Filename コネクタが処理中のファイルのファイル名(拡張子を含む)を返します。
FilenameNoExt コネクタが処理中のファイルのファイル名(拡張子なし)を返します。
MessageId コネクタがアウトプットするメッセージのMessageId を返します。
RegexFilename:pattern コネクタで処理中のファイルのファイル名にRegEx パターンを適用します。
Header:headername コネクタが処理中のメッセージのヘッダー(headername)の値を返します。
LongDate システムの現在の日時を長い形式(例:Wednesday, January 24, 2024)で返します。
ShortDate システムの現在の日時をyyyy-MM-dd 形式(例:2024-01-24)で返します。
DateFormat:format システムの現在の日時を指定されたフォーマット(format)で返します。使用可能な日付フォーマットについては、サンプル日付フォーマット を参照してください。
Vault:vaultitem 指定されたvault 項目の値を返します。

%Ext% や%ShortDate% などの引数を必要としないマクロもありますが、引数を必要とするマクロもあります。引数を渡すマクロはすべて次の構文を用います:%Macro:argument%

以下は、引数を渡すマクロの例です。

  • %Header:headername%:headername はメッセージのヘッダー名です。
  • %Header:mycustomheader% は、インプットメッセージで設定されたmycustomheader ヘッダーの値を返します。
  • %Header:ponum% は、インプットメッセージで設定されたponum ヘッダーの値に対応します。
  • %RegexFilename:pattern%:pattern は正規表現パターンです。例えば、%RegexFilename:^([\w][A-Za-z]+)% はファイル名の最初の単語と照合し、大文字と小文字を区別せずに結果を返します(test_file.xmltest に変換されます)。
  • %Vault:vaultitem%:vaultitem は、vault のアイテム名です。例えば、%Vault:companyname% はVault に保存されているcompanyname アイテムの値を返します。
  • %DateFormat:format%:format は使用可能な日付フォーマットです(詳細はサンプル日付フォーマット を参照してください)。例えば、%DateFormat:yyyy-MM-dd-HH-mm-ss-fff% はファイルの日付とタイムスタンプを返します。

以下の例に示すように、より詳細なマクロを作成することもできます。

  • 複数のマクロを1つのファイル名にまとめる:%DateFormat:yyyy-MM-dd-HH-mm-ss-fff%%EXT%
  • マクロの外側にテキストを含める:MyFile_%DateFormat:yyyy-MM-dd-HH-mm-ss-fff%
  • マクロ内にテキストを含める:%DateFormat:'DateProcessed-'yyyy-MM-dd_'TimeProcessed-'HH-mm-ss%

Common Errors

ERROR:

“Could not bind server socket: Permission denied.”

Cause

This error can appear when you attempt to connect to an FTP server and the process hosting Arc does not have sufficient privileges to establish a listener on the specified port.

Note: In some cases (such as Linux environments and hosted instances running in an Amazon AMI), you cannot use ports below 1024.

Resolution

Choose a different port, or change the identity of the process hosting Arc to one with permissions to bind to the port.

Amazon AMI ホステッド版のArc は、Ubuntu オペレーティングシステムを使用しているため、CData では、Uncomplicated Firewall(UFW)を使ってポート権限の問題を管理することをお勧めします。例えば、Arc のポート2022 でSFTP サーバーを実行するように設定し、OS レベルでポート22 を2022 に転送するためにUFW を使用する場合、次のようになります:

ufw allow 22/tcp
ufw allow 2022/tcp
echo "
*nat
:PREROUTING ACCEPT [0:0]
-A PREROUTING -p tcp --dport 22 -j REDIRECT --to-port 2022
COMMIT" >> /etc/ufw/before.rules

If your environment uses a different Linux operating system, CData recommends that you bind to a port above the restricted range (for example, 8021 for FTP traffic)) and use iptables to route incoming requests on the desired port to the allowed port:

iptables -t nat -I PREROUTING -p tcp --dport 21 -j REDIRECT --to-port 8021