Ubuntu Tips: 7 - Install FTP File Server

The following article explains how to install the vsftp application to run a FTP server on your Ubuntu computer

Author: Matthew Wittering | Published: 14th November 2009

File Transfer Protocol (FTP) is a TCP/IP protocol for uploading and downloading files between computers across networks and the Internet. FTP creates a connection between two computers following the client and server relationship model. Authentication of users connecting to FTP servers can be managed in one of two ways; anonymous or authenticated users.

As standard the FTP server I am going to demonstrate how to install allows anonymous users. I am going to show you how to secure the server only allowing authenticated users to access the server and expose the directory tree belonging to the registered user.

Step 1 - Install the FTP Server

Installing vsftpd are FTP server like other installation is a simple process. Start by opening a terminal window and enter the following command. If you have followed any of my previous example you will see the sudo command and instantly recognise you will need to enter the administrator password to complete the installation of the new service. Otherwise the user account will not have the necessary user privileges.

sudo apt-get install vsftpd

By default only anonymous FTP is allowed. If you wish to disable this option, you should continue with the tutorial and modify the configuration file.

Step 2 - Open the configuration file

Once the installation is complete you will now need to fire up the text editor and modify the configuration file. Enter the following line into the terminal to open the vsftpd.conf file in nano.

sudo nano /etc/vsftpd.conf

Now scroll through the file until you find the line for enabling anonymous users, anonymous_enable=YES. Once you have found that line replace it with the following:

anonymous_enable=NO

By default, local system users are not allowed to login to FTP server. If you want to change this setting, you should uncomment local_enabled=YES to offer this functionality to users.

local_enable=YES

The next and final configuration change is to enable the user to upload and write data to your server. By default the system will allow users to download data stored on your server using the FTP protocol. To allow registered users on your server to upload data using the FTP connection to update hosted websites requires this alteration to the activate this function.

write_enable=YES

Once this change has been made you have complete the modification to the configuration file. Now you can save and quit the nano editor.

Step 3 - Restart the FTP Server

The final step is to now restart the server application to enable the your changes to the configuration file.

sudo /etc/init.d/vsftpd restart

This work is licenced under a Creative Commons Licence

A brief introduction

Matthew WitteringI am a graduate of Lougborough University where I read Computing and Management BSc (Hons) earning a 2:1 classification.

Currently I am working in the Product Team as a Junior Product Manager at Ask Jeeves UK. Continue