FTP Server
  • 5 Minutes to read
  • Dark
    Light

FTP Server

  • Dark
    Light

Article Summary

FTP, or File Transfer Protocol, is a standard network protocol used for transferring files between a client and a server on a computer network. An FTP server, also known as an FTP site or FTP host, is a server computer that hosts files and provides them to clients over the FTP protocol, facilitating the exchange of files and data across the internet or a local network.

Prerequisites

Authorize Connection to FTP

In FTP

Please keep in mind that this guide provides general instructions, and your individual setup might need a different approach or some extra steps. Always take your organization's security guidelines into account when you're making these changes. Additionally, it's a good idea to seek assistance from a database administrator or an IT professional to make sure everything is set up correctly.

Enable Port Forwarding

Enable port forwarding to make sure your server is accessible from the Internet by following these steps.

  1. Assign a static IP to your server on your local network. This makes sure that the server's address remains constant, so other devices and services always know where to find it.
    1. Windows: You can set a static IP from the network settings.
    2. Linux: This is typically done by editing network configuration files, which vary by distribution (e.g., /etc/network/interfaces or /etc/netplan/ directory for Ubuntu).
  2. Configure port forwarding on your router. Log in to your router's web interface and look for a section called Port Forwarding, Virtual Server, or something similar. Create a new port forwarding rule:
    1. Service or Application: Name it e.g. FTP Server.
    2. Internal IP: Enter the static IP address of your server.
    3. Port Range: Depending on your server's configuration, this is typically port 21. For passive FTP, you'll need a range of ports (consult your FTP server's configuration to determine this).
    4. Protocol: Usually TCP.
  3. Configure your firewall to allow connection on the necessary ports. See our guide on how to allow network connection.
  4. [Optional: Skip if you have a cloud or virtual server.] Obtain a public IP address. If your network's IP address is dynamic (changes over time), you'll want to use a Dynamic DNS (DDNS) service. This gives you a domain name that automatically updates to point to your network's public IP address, even when it changes.
    1. Sign up with a DDNS provider and choose a domain name.
    2. Configure your router or a server application to update the DDNS service with your current public IP address.

Create User

Follow these steps to create a user with necessary permissions.

  1. In your interface, connect to the server by using the default host (127.0.0.1) and port (14147), unless you've changed these during setup.
  2. In the top menu, click on Edit and then select Users.
  3. Click on Add under the Users section, and a dialog box will pop up. Type the username and confirm.
  4. With the user selected, check the Password box in the Account settings and enter a strong password.

Configure Access Permissions

  1. Click on Shared folders from the page's left side and click on Add to choose a directory from your server that you want the user to access.
  2. Select your newly added directory. Below, you'll see Files and Directories permissions. Set the appropriate permissions by checking the following boxes:
    1. Read: The user can download files.
    2. Write: The user can upload files.
    3. Delete: The user can delete files and folders.
    4. Append: The user can append data to an existing file.
    5. Create: The user can create new directories or files.
    6. List: The user can list files and folders.

Allow Network Connection

For this destination, whitelisting IP addresses is not available in the database system. Instead, you can configure the network access at the firewall level. Here are the general steps:

  1. Identify the firewall that's protecting your service. This could be a Windows or Linux firewall running on the server itself, or it could be a network firewall.
  2. Open the firewall's configuration settings. This process will vary depending on the type of your firewall.
  3. Look for the setting that allows you to define inbound rules or policies.
  4. Create a new rule or policy that allows inbound traffic on the port that the service is using (the default is 21) from the Dataddo IP addresses.
  5. Save your changes and test the connection from Dataddo to make sure everything is working as intended.

In Dataddo

  1. On the Authorizers page, click on Authorize New Service and select FTP server.
  2. You will be asked to fill the following fields
    1. FTP Host: The address of your FTP server.
    2. Port: The port your FTP server is running on (default value is 21).
    3. Username: The username for the FTP account.
    4. Password: The password for the FTP account.
  3. Click on Save.

Create a New FTP Destination

  1. Under the Destinations tab, click on the Create Destination button and select the destination from the list.
  2. Select your account from the drop-down menu.
  3. Fill in the Path to your directory.
  4. Name your destination and click on Save to create your destination.
Need to authorize another connection?

Click on Add new Authorizer in drop-down menu during authorizer selection and follow the on-screen prompts. You can also go to the Authorizers tab and click on Add New Service.

Creating a Flow to FTP Server

  1. Navigate to Flows and click on Create Flow.
  2. Click on Connect Your Data to add your source(s).
  3. Click on Connect Your Data Destination to add the destination.
  4. Choose the write mode and fill in the other required information.
  5. Check the Data Preview to see if your configuration is correct.
  6. Name your flow and click on Create Flow to finish the setup.

File Partitioning

File partitioning splits large datasets into smaller, manageable partitions, based on criteria like date. This technique enhances data organization, query performance, and management by grouping subsets of data with shared attributes.

During flow creation:

  • Select one of the predefined file name patterns.
  • Define your own custom name to suit your partitioning needs.

Example of a custom file name
When creating a custom file name, use variations of the offered file names.

For example, use a base file name and add a different date range pattern :

xyz_{{1d1|Ymd}}

Using this file name, Dataddo will create a new file named xyz every day, e.g. xyz_20xx0101, xyz_20xx0102 etc.



Was this article helpful?