# FTP

{% hint style="info" %}
It is essential that you have basic knowledge of FTP before going through the following document.
{% endhint %}

## *Steps to Schedule any Report through FTP* :outbox\_tray:&#x20;

1. **Open** the report that needs to be scheduled.
2. **Click** the ![](https://791683593-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVN38pxrmSRWq3e_Evi%2Fuploads%2FEOVyDB3ALagZmJa3ZKk6%2Fimage.png?alt=media\&token=6396b709-0e9a-46db-ac9e-2ba3ad3a6ec7) button.

<figure><img src="https://791683593-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVN38pxrmSRWq3e_Evi%2Fuploads%2FIksX1zuav8nboz20OBux%2Fimage.png?alt=media&#x26;token=aa205867-6953-4e5c-ae93-433baa075650" alt=""><figcaption></figcaption></figure>

3. **Select** how often you want to run the report like **Hourly**, **Daily**, **Weekly**, or **Monthly**, and proceed to the next step. **Click** on **Save and continue.**
4. **Pick** the **date** & **time** and **select** how much data you want to **capture**, and **proceed** to the **next step**
5. **Select** the **FTP** tab and **click** on **Add FTP account.**

<figure><img src="https://791683593-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVN38pxrmSRWq3e_Evi%2Fuploads%2FHFI4mBR4CLScB4Jj9DxY%2Fimage.png?alt=media&#x26;token=5c61dba3-3e41-44e0-b50c-e5671f0de4ce" alt=""><figcaption></figcaption></figure>

6. **Fill** in the **credentials of your FTP account.** Entering the Private Key is **optional.**

<figure><img src="https://791683593-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVN38pxrmSRWq3e_Evi%2Fuploads%2Fs0f8xJodfdZNmw4ITREq%2Fimage.png?alt=media&#x26;token=5fcd1733-536c-4486-8af6-99bc14bda976" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Note:** Kindly[ Contact us,](https://dataexport.io/contact/) If you want to connect through a different **PORT NUMBR**, apart from **20** or **21.**
{% endhint %}

7. **Passive Mode:** It is enabled by default. Some customers use FTP in active connection mode. To resolve the issue permanently, we recommend that you switch to passive mode. You can ask your FTP provider to set up the FTP to accept the connection in passive mode.&#x20;

&#x20;      To learn more about passive mode, you can [click here.](#passive-mode)

8. **Select** a connection mode and **Click** on the '**Test Connection'** button. If the result is '**Success**', click the '**Save and Update'** button.&#x20;

If the result is '**failed'** or anything els&#x65;**,** it can be due to multiple reasons.

* You might have to **whitelist** Data Export's IP Address
  * Public IP Address 52.88.73.68&#x20;
  * Private IP Address 172.31.36.202
* You might have chosen the **wrong directory path.**
* You might have chosen a different **Port Number,** apart from **21**or **22.**
* You might have typed an **incorrect password or private key.**

If you still aren't able to connect, kindly [**contact us**,](https://dataexport.io/contact/) and we shall help you set it up.

{% hint style="success" %}
:star2: That's it! Your FTP report scheduling is all set. Good job!
{% endhint %}

## Passive Mode

In Passive Mode, the FTP client still initiates a command channel connection to the server. However, instead of sending the PORT command, it sends the passive command, which is basically a request for a server port to connect to, for data transmission. When the FTP server replies, it indicates what port number it has opened for the ensuing data transfer. \
\
Here's how passive mode works in a nutshell:

1. The FTP client connects from a random port to port 21 on the server and issues the PASV command. The server replies, indicating which (random) port it has opened for data transfer. <br>
2. The FTP client connects from another random port to the random port specified in the server's response. Once the connection is established, data transfers are made through these client and server ports.

![](https://791683593-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MVN38pxrmSRWq3e_Evi%2F-Mb1ED7kjAZ48bVUkTe9%2F-Mb1MZd1QDRMu7lxA1AK%2Fimage.png?alt=media\&token=1cdd59b7-244f-40e8-a2b7-def1e7502b65)
