# FTP

Use the FTP connector to interact with an FTP server. Primary functions include uploading and downloading files to and from an FTP server, but it is also capable of tasks such as creating remote directories, deleting files and directories, renaming files, and listing files and directories on the FTP server.

## Managing Connector : Add, Edit, or Delete

Follow the [steps in the link](https://docs.novacura.com/flow-connect/working-with-connect/connect-to-systems/managing-connector) as a guideline for connector actions: Add, Edit, and Delete.

## Configuration values

| Configuration                                   | Description                                                                                                                                                                                                   |
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Agent Group**                                 | Specifies the agent group on which the connector will be executed.                                                                                                                                            |
| **Server Address**                              | The hostname or IP address of the FTP server to connect to.                                                                                                                                                   |
| **Port**                                        | The network port used to establish the FTP connection (commonly 21 for FTP and 990 for implicit FTPS).                                                                                                        |
| **Username**                                    | The username used to authenticate with the FTP server.                                                                                                                                                        |
| **Password**                                    | The password associated with the specified username for server authentication.                                                                                                                                |
| **Transfer Type**                               | Defines how file data is transferred. Common options include Binary (for non-text files) and ASCII (for text files).                                                                                          |
| **Passive Mode**                                | Determines whether the client uses passive mode for data connections. Passive mode is typically required when connecting through firewalls or NAT.                                                            |
| **Transfer Type**                               | <p>Determines how the data is treated during transfer. </p><ul><li><strong>ASCII</strong> - text mode</li><li><strong>Binary</strong> - binary mode</li></ul><p>Binary is recommended and set as default.</p> |
| **Use SSL/TSL**                                 | Indicates whether SSL/TLS encryption is used for securing the FTP connection (FTPS).                                                                                                                          |
| **SSL Mode**                                    | Specifies how SSL/TLS is applied during connection. Examples include Explicit (upgrade from FTP to FTPS) or Implicit (always encrypted connection).                                                           |
| **Encrypt Data Channel**                        | Determines whether the data channel (file transfer channel) is encrypted in addition to the control channel.                                                                                                  |
| **Auth Command**                                | Defines the authentication command used during secure FTP negotiation (for example, AUTH TLS or AUTH SSL)                                                                                                     |
| **Validate Server**                             | Indicates whether the server SSL certificate should be validated during connection establishment.                                                                                                             |
| **SSL Resumption**                              | Controls whether SSL session resumption is enabled to improve performance when reconnecting securely.                                                                                                         |
| **Check CRL**                                   | Specifies whether Certificate Revocation Lists (CRL) are checked during certificate validation.                                                                                                               |
| **Check OCSP**                                  | Specifies whether Online Certificate Status Protocol (OCSP) validation is performed during certificate validation.                                                                                            |
| **Force Complete Chain Validation For Trusted** | Forces full certificate chain validation even if the certificate is already trusted locally.                                                                                                                  |
| **Force Revocation Check For Root**             | Forces revocation checks for root certificates in the certificate chain.                                                                                                                                      |
| **Mandatory CRL Check**                         | Requires CRL validation to succeed; connection fails if CRL validation cannot be completed.                                                                                                                   |
| **Mandatory OCSP Check**                        | Requires OCSP validation to succeed; connection fails if OCSP validation cannot be completed.                                                                                                                 |
| **Mandatory Revocation Check**                  | Requires at least one revocation check (CRL or OCSP) to succeed; connection fails otherwise.                                                                                                                  |
| **Revocation Moment Grace Period**              | Specifies the time buffer allowed when validating certificate revocation timestamps to handle propagation delays in revocation information.                                                                   |
| **Use System Storages**                         | Determines whether system certificate stores are used for certificate validation instead of custom certificate sources.                                                                                       |

## Operations

| Directory Operations                                                                                                                        | Description                                            |
| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| [Directory Exists](https://docs.novacura.com/flow-connect/reference/reference/flowscript/walkthrough/ftp-module#directoryexists)            | Determines whether directory exists at specified path. |
| [Create directory](https://docs.novacura.com/flow-connect/reference/reference/flowscript/walkthrough/ftp-module#createdirectory)            | Creates a directory at the specified path              |
| [Delete Empty Directory](https://docs.novacura.com/flow-connect/reference/reference/flowscript/walkthrough/ftp-module#deleteemptydirectory) | Deletes an empty directory at the specified path       |
| [List Directories](https://docs.novacura.com/flow-connect/reference/reference/flowscript/walkthrough/ftp-module#listdirectories)            | Lists all files and directories in the specified path  |

| File Operations                                                                                                           | Description                                           |
| ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| [File exists](https://docs.novacura.com/flow-connect/reference/reference/flowscript/walkthrough/ftp-module#fileexists)    | Checks if a remote file exists                        |
| [Delete File](https://docs.novacura.com/flow-connect/reference/reference/flowscript/walkthrough/ftp-module#deletefile)    | Delete a remote file                                  |
| [Delete Files](https://docs.novacura.com/flow-connect/reference/reference/flowscript/walkthrough/ftp-module#deletefiles)  | Delete multiple remote files based on mask            |
| [Get File Size](https://docs.novacura.com/flow-connect/reference/reference/flowscript/walkthrough/ftp-module#getfilesize) | Gets the size, in bytes, of a remote file             |
| [Rename File](https://docs.novacura.com/flow-connect/reference/reference/flowscript/walkthrough/ftp-module#renamefile)    | Rename a remote file                                  |
| [Get file Time](https://docs.novacura.com/flow-connect/reference/reference/flowscript/walkthrough/ftp-module#getfiletime) | Get the last modified date and time of a remote file. |
| [Set file Time](https://docs.novacura.com/flow-connect/reference/reference/flowscript/walkthrough/ftp-module#setfiletime) | Set the last modified date and time of a remote file. |

| Upload Operations                                                                                                          | Description                                                                                                         |
| -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| [Upload File](https://docs.novacura.com/flow-connect/reference/reference/flowscript/walkthrough/ftp-module#uploadfile)     | Uploads a single file to the FTP Server                                                                             |
| [Upload Files](https://docs.novacura.com/flow-connect/reference/reference/flowscript/walkthrough/ftp-module#uploadfiles)   | Upload multiple files to the FTP Server                                                                             |
| [Upload Stream](https://docs.novacura.com/flow-connect/reference/reference/flowscript/walkthrough/ftp-module#uploadstream) | <p>Uploads the content of a Flow variable that contains a binary stream<br>e.g. Upload data from a camera input</p> |

| Download Operations                                                                                                            | Description                                                                                    |
| ------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- |
| [Download File](https://docs.novacura.com/flow-connect/reference/reference/flowscript/walkthrough/ftp-module#downloadfile)     | Download a single file from the FTP server to the machine where Flow Connect agent is running  |
| [Download Files](https://docs.novacura.com/flow-connect/reference/reference/flowscript/walkthrough/ftp-module#downloadfiles)   | Download multiple files from the FTP server to the machine where Flow Connect agent is running |
| [Download Stream](https://docs.novacura.com/flow-connect/reference/reference/flowscript/walkthrough/ftp-module#downloadstream) | Download a file from FTP server and store it as Flow variable                                  |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.novacura.com/flow-connect/working-with-connect/connect-to-systems/connectors/ftp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
