Grid Guides

Explore How System On Grid Can Work For You

Grid Guide Topics

How to Setup FTP Server on Ubuntu 18.04

Table Of Contents

    ## Table of Contents

    – [Introduction](#introduction
    – [Prerequisites](#prerequisites
    – [VSFTPD Installation](#vsftpd-installation
    – [Configure FSFTPD Server](#configure-fsftpd-server
    – [Create FTP User](#create-ftp-user
    – [Connect to FTP Server](#connect-to-ftp-server
    – [Conclusion](#conclusion

    ## Introduction

    [FTP]( is a standard network protocol used for transfer of computer files between a client and server on Computer network. It is built on a client-server model architecture using separate control and data connections between the client and server.

    ## Prerequisites

    Privileged access to the system as root or a non-root user account with sudo privileges is required. Create a non-root user account with sudo privileges by following our guide, [Initial server setup with Ubuntu 18.04](

    ## VSFTPD Installation

    First of all, you have to install VSFTPD Thread. To do this you have to open the terminal and enter the below command.
    $ sudo apt-get install vsftpd
    Now it is installed. Next step is to configure the VSFTPD.

    ## Configure FSFTPD Server

    Before configuring FSFTPD server, you have to take a backup for current server configuration file:
    $ sudo mv /etc/vsftpd.conf /etc/vsftpd.conf_orig
    Now you have to create a new configuration file /etc/vsftpd.conf using text editor as shown below
    $ sudo nano /etc/vsftpd.conf
    Now you have to start basic FTP server configuration, and make sure that it is working and after assuring that it suited to all environments.
    Add this FTP configuration lines to /etc/vsftpd.conf file.


    If your UFW firewall is enabled then execute the below command to allow traffic to FTP ports.
    $ sudo ufw allow from any to any port 20,21,10000:10100 proto tcp
    Now it is done. Now you have to restart VSFTPD server to apply new changes.
    To do this use below command.
    $ sudo service vsftpd restart
    ## Create FTP User

    Now we have to create FTP user. If you want to create a new system account i.e. ftpuser then use the below script.
    $ sudo useradd -m ftpuser
    $ sudo passwd ftpuser


    To test it create an arbitrary file within ftpuser ‘s home directory. If you log in you can able to see and edit this file.
    $ sudo bash -c “echo FTP TESTING > /home/ftpuser/FTP-TEST”
    Now your FTP server configuration is over. If you want to use FTP on any other network than your local network, then it is better to configure SFTP server to add security to your FTP connections.

    ## Connect to FTP Server
    So far you are ready to use ftpuser to connect and login to your new FTP server. As of now your new FTP server can be resolved through hostname ubuntu-ftp now you can use ftp command for login:
    $ ftp testftp


    ## Conclusion
    Now we have described FTP configuration.