How to install an FTP server on Ubuntu server 12.04

Last modified
Thursday, February 9, 2017 - 20:19

The idea of this blog post is to show how to install and configure a secure FTP access to your server and provide support for your users.

I'm configuring it so all you users can have their /home/{username} directory available as their FTP folder(s) which I think is one of the most secure ways of configuring an FTP service. After following this tutorial you can create a "ftp" user in your system without ssh access (you can google that ;) ) and use it as you generic ftp user. First of all we need to download the FTP server, in this case I'm going to be using VSFTPD, in order to download it, we need to add the ppa to our system by issuing the following commands:

# sudo add-apt-repository ppa:thefrontiergroup/vsftpd sudo apt-get update

and then install the package:

# sudo apt-get install vsftpd

once installed we are going to add some configs to it, first backup the conf file that is provided with the new package, backup /etc/vsftpd.conf file then just create a new conf file and copy/paste the following

# sudo nano /etc/vsftpd.conf


listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
allow_writeable_chroot=YES

restart the ftp server:

# sudo service vsftpd restart

and that is all folks! now you have an FTP running on your system and configured so each user can have access to their /home directories.

Topic

Add new comment

This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.