FTP is the best way to transfer (read upload) files to the web servers from our PC. FTP stands for File
Transfer Protocol. It’s very unlikely that you haven’t heard about FTP servers yet. In case you really
haven’t, FTP on Wikipedia.

If you are using a shared host, you probably already have FTP server installed and
ready for access. But if you are using a dedicated server, you shall have to install FTP server
and configure it yourself before you can start uploading files using a FTP client like Filezilla. In this
post, we are going to see how we can easily install a FTP server on a Ubuntu machine.

We shall use the “vsftpd” server as it is very easy to setup and configure. Use the following command to
install it on a Ubuntu machine:

sudo apt-get install vsftpd

Like most other services on a Ubuntu machine, the configuration data is stored in “/etc/vsftpd.conf” file.
Before we start the service, let’s modify the configuration file to customize the server behaviour a bit.

Before editing the file, please make a backup of the original content. Use the following command:

sudo cp /etc/vsftpd.conf /etc/vsftpd_conf_orig.bkp

Now let’s edit the file and make the changes. To edit the file, we shall use the nano text editor:

sudo nano /etc/vsftpd.conf

Please note that nano is the most user friendly text editor on the terminal. If you don’t have it, please
use this command to install it first:

sudo apt-get install nano

Here’s a sample of custom configuration you might want to use:


listen=YES
anonymous_enable=YES
write_enable=YES
local_umask=022
anon_upload_enable=YES
anon_mkdir_write_enable=YES
xferlog_enable=YES
chown_uploads=YES
chown_username=masnun
ftpd_banner=Welcome to the FTP service.
chroot_local_user=NO
secure_chroot_dir=/var/run/vsftpd
pam_service_name=vsftpd

Leave the other options unchanged. After the configuration is done, let’s start the server:

sudo /etc/init.d/vsftpd start

You can stop it with this command:

sudo /etc/init.d/vsftpd stop

And restart using:

sudo /etc/init.d/vsftpd restart

ftp icon 300x300 Setting up and configuring FTP Server on Ubuntu