How to Install FTP Server on Ubuntu 16.04

r00t September 15, 2017

Install FTP Server on Ubuntu 16.04

In this tutorial we’ll learn how to install FTP Server on Ubuntu 16.04. We will also install and configure its prerequisites. The File Transfer Protocol (FTP) is a standard network protocol used to transfer computer files from one host to another host over a TCP-based network, such as the Internet or over LAN (Local Area Network). It is commonly used by most of the companies to share data with the customers.

I recommend to use a minimal Ubuntu server setup as a basis for the tutorial, that can be a virtual or a root server image with an Ubuntu 16.04 minimal install from a web hosting company or you use our minimal server tutorial to install a server from scratch.

Install FTP Server on Ubuntu 16.04

Step 1. First, ensure your system and apt package lists are fully up-to-date by running the following:

apt-get update -y
apt-get upgrade -y

Step 2. Installing FTP Server in Ubuntu.

Open terminal and type this command to install vsftpd:

apt-get -y install vsftpd

Once the installation completes, start the service vsftpd and configure automatically from the next system boot:

systemctl start vsftpd
systemctl enable vsftpd

Step 3. Configuring and Securing FTP Server in Ubuntu.

First, we will create a backup of the original config file /etc/vsftpd/vsftpd.conf like so:

cp /etc/vsftpd.conf /etc/vsftpd.conf.orig

Next, open the /etc/vsftpd.conf file:

nano /etc/vsftpd.conf

Change the following lines:

# Controls whether anonymous logins are permitted or not.
anonymous_enable=NO

# Allow local users to login
local_enable=YES

# Set 'write_enable' to YES in order to allow changes to the filesystem
write_enable=YES

# to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),
# without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be
# on the client anyway..
ascii_upload_enable=YES
ascii_download_enable=YES

# You can set the root directory of the FTP users. if not specified, users' home directory equals FTP home directory
local_root=public_html

Save the file and close it. Then we have to restart VSFTPD services for the changes above to take effect:

systemctl restart vsftpd

Step 4. Create FTP users.

Let us create an user called “test”.

sudo adduser test

Now you can access the ftp server from other computers of same LAN via an ftp clients like filezilla or gftp, or just access (read only) by using a web browser. You have to use the username and password of the server.

Congratulation’s! You have successfully install and configured FTP server on your Ubuntu 16.04 server. Thanks for using this tutorial for installing FTP server on Ubuntu 16.04 LTS (Xenial Xerus) system.

Save

The Tags:

Leave a Comment

Comments are closed.