> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arc.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SFTP Server Connector

> Configuration and usage guide for the CData Arc SFTP Server connector, which defines client profiles for authenticating to the built-in SFTP server.

export const TrustedIp = () => <>
    <p><strong>Trusted IP Addresses</strong> セクションでは、次の機能を使用できます。</p>

    <table>
      <thead>
        <tr><th>機能</th><th>説明</th></tr>
      </thead>
      <tbody>
        <tr><td><strong>Add</strong></td><td>新しいIP アドレス範囲を入力します。</td></tr>
        <tr><td><strong>Edit</strong></td><td>選択したIP アドレス範囲を変更します。</td></tr>
        <tr><td><strong>Delete</strong></td><td>選択したIP アドレス範囲をリストから削除します。</td></tr>
      </tbody>
    </table>

    <p>この機能には次の制限が適用されます。</p>

    <ul style={{
  listStyleType: 'disc',
  paddingLeft: '1.5rem'
}}>
      <li style={{
  display: 'list-item'
}}><code>localhost</code> はリストから変更または削除できません。</li>
      <li style={{
  display: 'list-item'
}}>定義された範囲外のIP アドレスはすべて拒否されます。</li>
      <li style={{
  display: 'list-item'
}}>範囲がサポートされています。例えば、エントリ<code>100.10.100.1-15</code> は、<code>100.10.100.1</code> から<code>100.10.100.15</code> までのIP アドレスが許可されることを示します。</li>
      <li style={{
  display: 'list-item'
}}>Classless inter-domain routing（CIDR）表記がサポートされています。例えば、エントリ<code>100.10.100.0/24</code> は、<code>100.10.100.0</code> から<code>100.10.100.255</code> までのIP アドレスが許可されることを示します。</li>
      <li style={{
  display: 'list-item'
}}>ワイルドカードパターンがサポートされています。例えば、エントリ<code>100.10.100.*</code> は、<code>100.10.100</code> で始まるIP アドレスが許可されることを示します。</li>
    </ul>

    <Note>
      <p>クライアントがサーバーに到達するには、明確なネットワークパスが必要です。クラウド環境では、次の3か所で変更が必要になる場合があります。</p>
      <p style={{
  paddingLeft: '1.5rem',
  marginTop: '0.25rem',
  marginBottom: '0.25rem'
}}>• クラウドコンソールのネットワークルール。</p>
      <p style={{
  paddingLeft: '1.5rem',
  marginTop: '0.25rem',
  marginBottom: '0.25rem'
}}>• アプリケーションをホストするマシンのファイアウォールルール。例えば、Amazon AMI を使用する場合、<em>Uncomplicated Firewall</em>（UFW）を使用して目的のポートでのトラフィックを許可できます。Linux 環境での一般的な方法は、1024 より小さいポートから1024 より大きい非標準ポートへトラフィックを転送し、アプリケーションがその非標準ポートを使用するように設定することです。これにより、非rootユーザーが1024 より小さいポートにバインドする際の権限の問題を回避できます。</p>
      <p style={{
  paddingLeft: '1.5rem',
  marginTop: '0.25rem',
  marginBottom: '0.25rem'
}}>• <a href="/26.3/cloud/ja/getting-started/administration/settings/security">Security</a> タブの<a href="/26.3/cloud/ja/getting-started/administration/settings/network-access">Network Access</a> 部分。</p>
    </Note>
  </>;

export const ServerStatus = () => <>
    <p><em>コネクタの基盤サービスの現在の状態。以下のステータスが使用可能です：</em></p>
    <table>
      <thead>
        <tr>
          <th>ステータス</th>
          <th>説明</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><strong>アクティブ</strong></td>
          <td>サービスが実行中です。</td>
        </tr>
        <tr>
          <td><strong>非アクティブ</strong></td>
          <td>サービスは設定済みですが、現在は実行されていません。</td>
        </tr>
        <tr>
          <td><strong>未設定</strong></td>
          <td>基盤となるプロファイルまたはサービスが設定されていません。</td>
        </tr>
      </tbody>
    </table>
  </>;

export const NameDescription = ({extraRows}) => <table>
    <thead>
      <tr>
        <th>設定</th>
        <th>説明</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><strong>Connector Id</strong></td>
        <td>コネクタの静的で一意の識別子です。</td>
      </tr>
      <tr>
        <td><strong>Connector Type</strong></td>
        <td>コネクタ名とその機能の説明を表示します。</td>
      </tr>
      <tr>
        <td><strong>Connector Description</strong></td>
        <td>コネクタおよびフロー内でのその役割について自由形式の説明を提供するためのオプションフィールドです。</td>
      </tr>
      {extraRows}
    </tbody>
  </table>;

export const SlasTab = ({siteName = "CData Arc"}) => <>
    <p><em>サービスレベルアグリーメント（SLA）の設定に関する設定です。</em></p>
    <p>
      SLA を使用すると、フロー内のコネクタが送受信すると見込まれるボリュームを設定し、そのボリュームを達成すると見込まれる期間を設定できます。{siteName} は、SLA が達成されない場合にユーザーへ警告するメールを送信し、SLA を<em>At Risk</em> としてマークします。これは、SLA が間もなく達成されない場合に<em>Violated</em> としてマークされることを意味します。これにより、ユーザーは介入してSLA が達成されない理由を特定し、適切な対応を取る機会を得られます。At Risk 期間の終了時点でもSLA が達成されない場合、SLA はviolated としてマークされ、ユーザーに再度通知されます。
    </p>
    <p>
      SLA を定義するには、<strong>Expected Volume</strong> をオンに切り替え、<strong>Settings</strong> タブをクリックします。
    </p>
    <img src="/public/images/sla_empty.png" alt="SLA Empty" />
    <ul>
      <li>コネクタに送信と受信の個別のアクションがある場合は、ラジオボタンを使用してSLA がどちらの方向に適用されるかを指定します。</li>
      <li>ウィンドウの<strong>Expect at least</strong> 部分で、次を設定します。
        <ul>
          <li>処理を見込む最小トランザクション数（ボリューム）を設定します。</li>
          <li><strong>Every</strong> フィールドを使用して期間を指定します。</li>
          <li>SLA を有効にするタイミングを指定します。<strong>Starting on</strong> を選択した場合は、日付および時刻フィールドを入力します。</li>
          <li>SLA を有効にしたい曜日のチェックボックスをオンにします。必要に応じて、ドロップダウンで<strong>Everyday</strong> を選択します。</li>
        </ul>
      </li>
      <li>ウィンドウの<strong>Set status to 'At Risk'</strong> 部分で、SLA をAt Risk としてマークするタイミングを指定します。
        <ul>
          <li>デフォルトでは、SLA が違反状態になるまで通知は送信されません。これを変更するには、<strong>Send an 'At Risk' notification</strong> をオンにします。</li>
        </ul>
      </li>
    </ul>
    <p>
      次の例は、月曜日から金曜日まで毎日1000 件のファイルを受信すると見込むコネクタ向けに設定されたSLA を示しています。1000 件のファイルが受信されていない場合、期間の終了の1時間前にAt Risk 通知が送信されます。
    </p>
    <img src="/public/images/sla_defined.png" alt="SLA Configuration Example" />
    <Note>
      必要に応じてSLA アラートをオフにすることができます。これはメンテナンスウィンドウ中に役立ちます。navbar で<strong>Settings</strong> をクリックし、<strong>Alerts &gt; General Alerts</strong> に移動します。タブレットと鉛筆のアイコンをクリックして編集し、<strong>SLA Alerts</strong> 設定のチェックを外します。
    </Note>
  </>;

export const AlertsTab = ({siteNameShort = "Arc"}) => <>
    <p><em>アラートの設定に関する設定です。</em></p>
    <p>
      サービスレベルアグリーメント（SLA）を実行する前に、通知用のメールアラートをセットアップする必要があります。デフォルトでは、{siteNameShort} は<a href="/26.3/cloud/ja/getting-started/administration/settings/alerts">Alerts</a> タブのグローバル設定を使用します。このコネクタに別の設定を使用するには、<strong>Override global setting</strong> をオンに切り替えます。
    </p>
    <p>
      デフォルトではエラーアラートが有効になっており、エラーが発生するたびにメールが送信されます。これをオフにするには、<strong>Enable</strong> チェックボックスのチェックを外します。
    </p>
    <p>
      <strong>Subject</strong>（必須）を入力します。<strong>Allow {siteNameShort}Script in Subject</strong> をチェックすると、<strong>Subject</strong> フィールドで{siteNameShort}Script を使用できます。これを選択すると、<strong>{siteNameShort}Script エディタ</strong>ボタンが表示されます（<img src="/public/images/rest_arcscript_editor.png" alt="arcscript editor button" style={{
  display: 'inline',
  verticalAlign: 'middle',
  margin: 0
}} />）。
    </p>
    <p>
      必要に応じて<strong>Recipient</strong> のメールアドレスをカンマ区切りのリストで入力します。
    </p>
  </>;

export const MiscConnector = () => <>
    <p><em>Miscellaneous 設定は、特定のユースケース向けの設定です。</em></p>
    <table>
      <thead>
        <tr>
          <th>設定</th>
          <th>説明</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><strong>Other Settings</strong></td>
          <td>非表示のコネクタ設定をセミコロン区切りのリストで設定できます（例：<code>setting1=value1;setting2=value2</code>）。通常のコネクタのユースケースや機能では、これらの設定の使用は必要ありません。</td>
        </tr>
      </tbody>
    </table>
  </>;

export const Logging = () => <>
    <p><em>ログの作成と保存を制御する設定です。</em></p>
    <table>
      <thead>
        <tr>
          <th>設定</th>
          <th>説明</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><strong>Log Level</strong></td>
          <td>コネクタが生成するログの詳細度です。サポートを依頼する際は、これを<strong>Debug</strong> に設定してください。</td>
        </tr>
        <tr>
          <td><strong>Log Subfolder Scheme</strong></td>
          <td>選択した間隔に従って、コネクタがLogs フォルダ内のファイルをグループ化するよう指示します。<strong>Weekly</strong> オプション（デフォルト）は、コネクタが毎週新しいサブフォルダを作成し、その週のすべてのログをそのフォルダに保存するよう指示します。この設定を空白のままにすると、コネクタはすべてのログをLogs フォルダに直接保存します。多数のトランザクションを処理するコネクタでは、サブフォルダを使用することでログを整理しやすくなり、パフォーマンスが向上します。</td>
        </tr>
        <tr>
          <td><strong>Log Messages</strong></td>
          <td>処理したファイルのログエントリにファイル自体のコピーを含めるには、これをオンにします。これを無効にすると、<strong>Transactions</strong> タブからファイルのコピーをダウンロードできなくなる場合があります。</td>
        </tr>
      </tbody>
    </table>
  </>;

export const ProfileLogging = () => <>
    <p><em>ログの作成と保存を制御する設定です。</em></p>
    <table>
      <thead>
        <tr>
          <th>設定</th>
          <th>説明</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><strong>Log Level</strong></td>
          <td>コネクタが生成するログの詳細度です。サポートを依頼する際は、これを<strong>Debug</strong> に設定してください。</td>
        </tr>
        <tr>
          <td><strong>Log Rotate Interval</strong></td>
          <td>新しいログファイルを作成するまでに待機する日数です。</td>
        </tr>
        <tr>
          <td><strong>Log Delete Interval</strong></td>
          <td>古いログファイルを削除するまでに待機する日数です。</td>
        </tr>
      </tbody>
    </table>
  </>;

export const MacrosExamples = ({extraMacros = []}) => <>
    <p>
      %Ext% や %ShortDate% などの一部のマクロは引数を必要としませんが、引数を必要とするものもあります。
      引数を取るすべてのマクロは次の構文を使用します。<code>%Macro:argument%</code>
    </p>

    <p>引数を取るマクロの例を次に示します。</p>

    <ul>
      <li>%Header:headername%：<code>headername</code> はメッセージ上のヘッダーの名前です。</li>
      <li>%Header:mycustomheader% は、入力メッセージに設定された<code>mycustomheader</code> ヘッダーの値に解決されます。</li>
      <li>%Header:ponum% は、入力メッセージに設定された<code>ponum</code> ヘッダーの値に解決されます。</li>
      <li>%RegexFilename:pattern%：<code>pattern</code> は正規表現パターンです。例えば、<code>%RegexFilename:^([\w][A-Za-z]+)%</code> は、ファイル名の最初の単語にマッチしてそれに解決され、大文字・小文字を区別しません（<code>test_file.xml</code> は<code>test</code> に解決されます）。</li>
      <li>%Vault:vaultitem%：<code>vaultitem</code> は<a href="/26.3/cloud/ja/getting-started/administration/settings/global-settings-vault">Vault</a> 内のアイテムの名前です。例えば、<code>%Vault:companyname%</code> は、Vault に保存された<code>companyname</code> アイテムの値に解決されます。</li>
      <li>%DateFormat:format%：<code>format</code> は許容される日付形式です（詳細は<a href="/26.3/cloud/ja/scripting/value-formatters/date-formatters#sample-date-formats">日付形式のサンプル</a>を参照してください）。例えば、<code>%DateFormat:yyyy-MM-dd-HH-mm-ss-fff%</code> は、ファイルの日付とタイムスタンプに解決されます。</li>
      {extraMacros.filter(item => item.example).map(item => <li key={`ex-${item.name}`}>{item.example}</li>)}
    </ul>

    <p>次の例に示すように、より高度なマクロを作成することもできます。</p>

    <ul>
      <li>1 つのファイル名で複数のマクロを組み合わせる：<code>%DateFormat:yyyy-MM-dd-HH-mm-ss-fff%%EXT%</code></li>
      <li>マクロの外側にテキストを含める：<code>MyFile_%DateFormat:yyyy-MM-dd-HH-mm-ss-fff%</code></li>
      <li>マクロの内側にテキストを含める：<code>%DateFormat:'DateProcessed-'yyyy-MM-dd_'TimeProcessed-'HH-mm-ss%</code></li>
    </ul>
  </>;

export const MacrosTable = ({siteName = "CData Arc", extraMacros = []}) => <>
    <p>
      ファイル命名戦略でマクロを使用すると、データの整理効率と文脈の理解を高めることができます。
      ファイル名にマクロを組み込むことで、識別子、タイムスタンプ、ヘッダー情報などの関連情報を
      動的に含めることができ、各ファイルに有用な文脈を提供します。
    </p>

    <p>{siteName} は次のマクロをサポートしています。これらはすべて次の構文を使用します。<code>%Macro%</code></p>

    <table>
      <thead>
        <tr><th>マクロ</th><th>説明</th></tr>
      </thead>
      <tbody>
        <tr><td>ConnectorID</td><td>コネクタのConnectorID に評価されます。</td></tr>
        <tr><td>ConnectorName</td><td>コネクタの名前に評価されます。ファイル名やパスに接続名を含めることができます。例えば、どのデータベース接続が生成したかによってバックアップファイルにタグを付けるために使用できます。</td></tr>
        <tr><td>Ext</td><td>コネクタが現在処理しているファイルの拡張子に評価されます。</td></tr>
        <tr><td>Filename</td><td>コネクタが現在処理しているファイルのファイル名（拡張子を含む）に評価されます。</td></tr>
        <tr><td>FilenameNoExt</td><td>コネクタが現在処理しているファイルのファイル名（拡張子を除く）に評価されます。</td></tr>
        <tr><td>MessageId</td><td>コネクタが出力しているメッセージのMessageId に評価されます。</td></tr>
        <tr><td>RegexFilename:<em>pattern</em></td><td>コネクタが現在処理しているファイルのファイル名に正規表現パターンを適用します。</td></tr>
        <tr><td>Header:<em>headername</em></td><td>コネクタが現在処理しているメッセージ上の対象ヘッダー（<code>headername</code>）の値に評価されます。</td></tr>
        <tr><td>LongDate</td><td>システムの現在の日時を長い形式（例：Wednesday, January 24, 2024）で評価します。</td></tr>
        <tr><td>ShortDate</td><td>システムの現在の日時をyyyy-MM-dd 形式（例：2024-01-24）で評価します。</td></tr>
        <tr><td>DateFormat:<em>format</em></td><td>システムの現在の日時を指定された形式（<code>format</code>）で評価します。利用可能な日時形式については、<a href="/26.3/cloud/ja/scripting/value-formatters/date-formatters#date-formats-with-literal-characters">日付形式のサンプル</a>を参照してください。</td></tr>
        <tr><td>Vault:<em>vaultitem</em></td><td>指定されたVault アイテムの値に評価されます。</td></tr>
        {extraMacros.map(item => <tr key={item.name}>
            <td>{item.name}</td>
            <td>{item.description}</td>
          </tr>)}
      </tbody>
    </table>
  </>;

export const companyName = "CData";

export const siteNameShort = "Arc";

export const siteName = "CData Arc";

Each SFTP Server connector defines a unique client profile that can be used to authenticate to the {siteNameShort} SFTP Server.

## Key Capabilities

* Embedded SSH-based secure file server with multi-user support
* Flexible authentication including password, public key, and Windows/AD integration (Windows/AD integration is only available in the .NET edition)
* Individual user directories with customizable folder structures and additional paths
* Advanced security features including login attempt lockouts and IP restrictions
* Support for temporary file extensions and automatic file movement after operations

## Overview

The {siteNameShort} SFTP Server connector is primarily configured on the [Profiles](../getting-started/administration/profiles) page. Then, individual SFTP Server connectors can be created for each trading partner who should have access to the server. The SFTP Server connector defines a trading partner's credentials (username, password and/or public key) and provides a unique home directory on the server.

Each user's home directory contains a *Send* folder, where clients can download files, and a *Receive* folder, where clients can upload files. You can rename these folders on the [Advanced tab](#advanced-tab). SFTP clients are not given permissions to the root of the SFTP server, which means that SFTP clients should always *cd* into the Send or Receive directories after connecting.

The SFTP Server also supports Windows/AD authentication. See [Windows Authentication](#windows-authentication) for details.

### Video Resources

Watch this short video for an overview of how to configure an SFTP Server.

<iframe width="560" height="315" src="https://www.youtube.com/embed/R1OrVVdqySU" frameBorder="0" allowFullScreen />

## Profile Configuration

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

### Server Configuration

*Server implementation settings.*

| Setting                    | Description                                                                                                                                                                                                                                                                                                         |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Port**                   | The port on which the SFTP server listens for incoming connections.                                                                                                                                                                                                                                                 |
| **Server Certificate**     | The certificate that identifies the server.                                                                                                                                                                                                                                                                         |
| **Certificate Password**   | The password required to access the server certificate.                                                                                                                                                                                                                                                             |
| **Login Banner**           | The banner presented to SFTP 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 (for each configured SFTP 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 SFTP 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).                                                            |
| **Windows Authentication** | Check this to use Windows Authentication to authenticate users instead of the SFTP Server connector configurations. Only available in the [.NET edition](../getting-started/installation/windows-edition) of {siteNameShort}. See [Windows Authentication](#windows-authentication) for more information.           |
| **Security Group**         | The name of the Windows group used for granting access to the server. This can be a group on the local machine or on the domain. Only applicable when **Use Windows Authentication** is checked.                                                                                                                    |

#### Lockouts

*Optional settings related to locking server access.*

| Setting               | Description                                                                      |
| --------------------- | -------------------------------------------------------------------------------- |
| **Failed Attempts**   | The number of unsuccessful login attempts allowed before the user is locked out. |
| **Lockout Period**    | The length of time (in minutes) that the user is locked out.                     |
| **Time Check Period** | The length of time (in minutes) that records are kept of failed login attempts.  |

#### Trusted IP Addresses

<TrustedIp />

### Advanced Settings

| Setting                | Description                                                                             |
| ---------------------- | --------------------------------------------------------------------------------------- |
| **Inactivity Timeout** | The length of time (in seconds) that must pass without activity for a user to time out. |

#### Logging

<ProfileLogging />

#### Miscellaneous

<MiscConnector />

## Connector Configuration

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

### Settings Tab

#### Configuration

<NameDescription />

#### サーバーステータス

<ServerStatus />

**SFTP サーバープロファイルを表示**リンクをクリックして新しいタブでプロファイルを開きます。

#### User Configuration

*Credentials for authenticating to the local SFTP server.*

| Setting                 | Description                                                                                                                        |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| **User**                | The username credential for logging in to the local SFTP server.                                                                   |
| **Authentication Mode** | The type of authentication to use with the SFTP server. The following fields vary based on your authentication mode.               |
| **Password**            | The password credential for logging in to the SFTP server.                                                                         |
| **Client Certificate**  | The public key certificate corresponding to the private certificate the client uses when you choose **Public Key** authentication. |

#### Permissions

*Settings related to the read/write permissions for the Send and Receive folders.*

| Setting                           | Description                                                                                                     |
| --------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| **Send Directory Permissions**    | Use the checkboxes to set read/write permissions for the *Send* directory. This is where files are downloaded.  |
| **Receive Directory Permissions** | Use the checkboxes to set read/write permissions for the *Receive* directory. This is where files are uploaded. |

### Advanced Tab

#### Local Folders

*Settings related to the folders where clients upload and download files. Rename the default folders here.*

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

#### Additional Paths

The SFTP Server connector allows you to expose paths in addition to the Input and Output folders. To configure additional paths, follow these steps:

1. Use the **Path** field to specify the additional path that should be exposed. Path values are relative to the **Root Directory** defined on the Profiles page.
2. Set the permissions for the additional path using the **Read** and **Write** checkboxes.
3. If more paths are needed, click **New** and repeat these steps for each path.

For example, if **Root Directory** is set to `/var/opt/arc/sftpserver`, and an additional path of `MyAdditionalPath` is added, it maps to the `/var/opt/arc/sftpserver/MyAdditionalPath` path on disk.

#### Advanced Settings

*Settings not included in the previous categories.*

| Setting                     | Description                                                                                                                                                                                                                                                                                                                                                      |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Home Directory**          | The configured server path where connected users start after logging in. Use the connector home, the Send or Receive folder, or a defined [additional path](#additional-paths). For the valid locations and how the path is validated, see [Home Directory](#home-directory).                                                                                    |
| **Allowed Files Filter**    | A glob pattern that determines which files are accepted by the SFTP 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 Server Configuration portion of the Profiles page. |
| **Move File After Send**    | Specifies whether files in the *Send* folder should be moved to the *Sent* folder after they are downloaded by the client.                                                                                                                                                                                                                                       |
| **Temp Receive Extensions** | Files with a matching extension are not recorded in the Receive table and do not fire the **After Receive** event until after they are renamed. Supply a comma-delimited list of 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 have a *Subfolder* header added to received messages. It represents the path relative to the local folders or additional paths.                                                                                                                                                                                                                    |
| **Finalize on Disconnect**  | チェックすると、クライアントが切断するまでファイルの確定を遅延させます。これにより、クライアントはアップロードしたファイルに対して追加の操作（名前変更など）を、ファイルが早期に移動されることによるエラーなしに実行できます。                                                                                                                                                                                                                                                  |
| **Local File Scheme**       | A scheme for assigning filenames to messages that are output by the connector. You can use macros in your filenames dynamically to include information such as identifiers and timestamps. For more information, see [Macros](#macros).                                                                                                                          |

#### Logging

<Logging />

#### Miscellaneous

<MiscConnector />

### Alerts Tab

<AlertsTab />

### SLAs Tab

<SlasTab />

## Establishing a Connection

Each SFTP Server connector represents a single trading partner's connection parameters. The trading partner should connect to the SFTP server using the server settings from the [Profiles](../getting-started/administration/profiles) page (port, server certificate, and so on) and the authentication settings in the dedicated SFTP Server connector (user and password).

Each trading partner has a pair of *Send* and *Receive* directories that are subfolders of the root. The partner downloads files from the Send folder and uploads files to the Receive folder. The client is not permitted to upload or download files from the root.

## Home Directory

The **Home Directory** setting controls which folder a client lands in when it logs in to an SFTP Server connector. Configure it on the connector's **Advanced** tab, under **Advanced Settings**. Setting a home directory is useful when you migrate from other SFTP or FTP software that lets you configure a landing folder, or for automated systems that upload or download at whatever directory they land in without issuing navigation (`cd`) commands.

The field defaults to empty, but it also accepts a server path:

* **Empty (default):** The client lands at the connector home (`/<connectorId>`).
* **Set to a path:** On successful login, the client's initial working directory is the specified path. A client that connects and immediately uploads, downloads, or lists files without changing directories operates inside the home directory.

The home directory must be a server path (starting with `/`) that resolves against the **Root Directory** defined on the connector's [Profile](#profile-configuration), and it must match a configured server location; you cannot set it to an arbitrary path that only exists on disk. For the SFTP Server connector, the valid locations are:

* `/<connectorId>` (the connector home): this is the default when the field is empty
* `/<connectorId>/Send`
* `/<connectorId>/Receive`
* Any defined [additional path](#additional-paths) (for example, `/Staging`)

The server root (`/`) is not a valid home directory on the SFTP Server connector; it returns a permission error, because there is no readable mount at the root.

The field normalizes your input, so `Receive`, `/Receive`, `\Receive`, and `/Receive/` are all treated as the same path. The value is validated when you save the connector: a path that does not match a configured server location is rejected with an error that names the invalid value. If you set an additional path as the home directory and that path is later removed from the configuration, saving the connector rejects the now-stale value.

<Note>The home directory only sets the initial landing directory at login. It is not a chroot or jail and does not restrict which folders a client can navigate to afterward; folder access is still governed by the [permission settings](#permissions).</Note>

### Home Directory and the SFTP Client Remote Path

When an [SFTP](./sftp) client connector connects to an SFTP Server connector that has a home directory configured, the SFTP client's **Remote Path** setting still applies independently. The following table shows the resulting working directory for each combination:

| SFTP Server Home Directory | SFTP Client Remote Path | Resulting working directory |
| -------------------------- | ----------------------- | --------------------------- |
| *(empty)*                  | *(empty)*               | `/<connectorId>`            |
| *(empty)*                  | `/`                     | Permission error            |
| *(empty)*                  | `Receive`               | `/<connectorId>/Receive`    |
| `/Test`                    | *(empty)*               | `/Test`                     |
| `/Test`                    | `/`                     | Permission error            |
| `/Test`                    | `/<connectorId>`        | `/<connectorId>`            |

## Windows Authentication

When Windows Authentication is enabled on the [Server Configuration](./sftp-server#server-configuration) portion of the Profiles tab, individual SFTP Server connectors are not required to grant login access to the SFTP Server. Instead, you need to specify the name of the Windows **Security Group** that should be granted access to the server.

When Windows Authentication is enabled, the **Root Directory** profile setting supports the %User% and %Domain% macros to establish separate root directories for separate users in the security group. Therefore, when Windows Authentication is enabled, users *are* permitted to upload/download files in the root directory (this is not true when you use SFTP Server connectors for authentication).

Once files are uploaded to the user-specific folder, they can be entered into the {siteNameShort} flow using a [File connector](./file).

## Macros

<MacrosTable />

### Examples

<MacrosExamples />

## Common Errors

### Error: Could not bind server socket: Permission denied.

**Cause**

This error can appear when attempting to connect to an SFTP server and the process hosting {siteNameShort} does not have sufficient privileges to establish a listener on the specified port. Note that in some cases (such as Linux environments and hosted instances running in an Amazon AMI), ports below 1024 are forbidden from access.

**Resolution**

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

The Amazon AMI-hosted version of {siteNameShort} uses the Ubuntu operating system, so {companyName} recommends that you use an *Uncomplicated Firewall* (UFW) to manage port permission issues. For example, setting up SFTP Server to run on port 8022 in {siteNameShort} and using UFW to forward port 22 to 8022 at the OS level looks like this:

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

If your environment uses a different Linux operating system, {companyName} recommends that you bind to a port above the restricted range (for example, 8022 for SFTP traffic) and use `iptables` to route incoming requests on the desired port to the allowed port:

`iptables -t nat -I PREROUTING -p tcp --dport 22 -j REDIRECT --to-port 8022`
