How To Install and Configure FTP Server On Kali Linux With SSL
How To Install and Configure FTP Server On Kali Linux With SSL
SPRING SPECIAL: Buy one E-2388G server, get one of our selected
DEPLOY NOW
June 6, 2019
FTP UBUNTU
Introduction
If you are looking to install an FTP server on Ubuntu, you can’t beat the simplicity
of vsftpd .
FTP stands for File Transfer Protocol. It is similar to HTTP (HyperText Transfer
Protocol), in that it specifies a language for transferring data over a network. FTP is
unencrypted by default, so by itself, it is not a good choice for secure transmission of
data.
This guide will help you install and configure an FTP server with vsftpd on Ubuntu.
https://phoenixnap.com/kb/install-ftp-server-on-ubuntu-vsftpd 1/11
26/4/22, 14:28 How
To Install and
Configure FTP Server
on Ubuntu With
VSFTPD
SPRING SPECIAL: Buy one E-2388G server, get one of our selected
dedicated servers FOR FREE!
DEPLOY NOW
Prerequisites
https://phoenixnap.com/kb/install-ftp-server-on-ubuntu-vsftpd 2/11
26/4/22, 14:28 How To Install and Configure FTP Server on Ubuntu With VSFTPD
Create a backup copy of the default configuration file by entering the following:
https://phoenixnap.com/kb/install-ftp-server-on-ubuntu-vsftpd 3/11
26/4/22, 14:28 How To Install and Configure FTP Server on Ubuntu With VSFTPD
SPRING SPECIAL: Buy one E-2388G server, get one of our selected
sudo useradd -m testuser
dedicated servers FOR FREE!
sudo passwd testuser DEPLOY NOW
The system should ask you to create a password for the new testuser account.
Note: If you are using a different firewall, refer to the instructions to allow
access on Port 20 and Port 21. These are the
listening ports for the FTP service.
Replace ubuntu-ftp with the name of your system (taken from the command line).
Log in using the testuser account and password you just set. You should now be
successfully logged in to your FTP server.
https://phoenixnap.com/kb/install-ftp-server-on-ubuntu-vsftpd 4/11
26/4/22, 14:28 How To Install and Configure FTP Server on Ubuntu With VSFTPD
Now, you can put any files you want to share via FTP into the /srv/ftp folder (if you left
it as the default), or the /srv/ftp/new_location/ directory (if you changed it).
Authenticate FTP Users
If you want to let authenticated users upload files, edit the vsftpd.conf file by entering the
following:
Find the entry labeled write_enable=NO, and change the value to “YES.”
https://phoenixnap.com/kb/install-ftp-server-on-ubuntu-vsftpd 5/11
26/4/22, 14:28 How
To Install and
Configure FTP Server
on Ubuntu With
VSFTPD
SPRING SPECIAL: Buy one E-2388G server, get one of our selected
dedicated servers FOR FREE!
DEPLOY NOW
Save the file, exit, then restart the FTP service with the following:
This allows the user to make changes inside their home directory.
Securing FTP
Numerous exploits take advantage of unsecured FTP servers. In response, there are
several configuration options in vsftpd.conf that can help secure your FTP server.
chroot_local_user=YES
https://phoenixnap.com/kb/install-ftp-server-on-ubuntu-vsftpd 6/11
26/4/22, 14:28 How
To Install and
Configure FTP Server
on Ubuntu With
VSFTPD
SPRING SPECIAL: Buy one E-2388G server, get one of our selected
dedicated servers FOR FREE!
DEPLOY NOW
Create a User List File
To create a list file, edit /etc/vsftpd.chroot_list, and add one user per line.
Instruct your FTP server to limit this list of users to their own home directories by editing
vsftpd.conf:
chroot_local_user=YES
chroot_list_file=/etc/vsftpd.chroot_list
By default, the list of blocked users from FTP access is stored in /etc/ftpusers. To add
blocked users, edit this file and add one user per line.
For this to work, users need to be set up with a shell account on the FTP server. This
will add a layer of secure encryption to your FTP traffic.
1. Start by creating a new certificate with openssl. To do so, run the command:
https://phoenixnap.com/kb/install-ftp-server-on-ubuntu-vsftpd 7/11
26/4/22, 14:28 How To Install and Configure FTP Server on Ubuntu With VSFTPD
SPRING SPECIAL: Buy one E-2388G server, get one of our selected
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -
keyout /
dedicated servers FOR FREE!
etc/ssl/private/vsftpd.pem -out
/etc/ssl/private/vsftpd.pem DEPLOY NOW
2. Provide the required information when prompted or keep the default configuration by
pressing Enter.
3. Next, open your vsftpd.conf file in an editor and change the line ssl_enable=NO to
ssl _enable=YES:
ssl_enable=YES
rsa_cert_file=/etc/ssl/private/vsftpd.pem
rsa_private_key_file=/etc/ssl/private/vsftpd.pem
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
require_ssl_reuse=NO
ssl_ciphers=HIGH
pasv_min_port=40000
pasv_max_port=50000
https://phoenixnap.com/kb/install-ftp-server-on-ubuntu-vsftpd 8/11
26/4/22, 14:28 How To Install and Configure FTP Server on Ubuntu With VSFTPD
FTPS is a different protocol that SFTP. SFTP stands for Secure File SPRING
Conclusion
Transfer Protocol, and it’s an entirely different dedicated servers FOR FREE! DEPLOY
protocol. NOW
Now, you should have installed an FTP server on Ubuntu with vsftpd.
You should now be able to configure your user lists and accounts, and connect to your
new FTP server. We also detailed the risks of the FTP protocol, and how to mitigate
them.
Sofija Simic
Sofija Simic is an aspiring Technical Writer at phoenixNAP. Alongside her educational
background in teaching and writing, she has had a lifelong passion for information
technology. She is committed to unscrambling confusing IT concepts and streamlining
intricate software installations.
SysAdmin, Web
Servers
How To Install an
FTP Server on
CentOS 7 With
VSFTPD
February 28, 2019
In this updated
Tutorial, learn how to
Setup FTP Server with
VSFTPD on CentOS 7.
FTP stands for File
Transfer
https://phoenixnap.com/kb/install-ftp-server-on-ubuntu-vsftpd 9/11
26/4/22, 14:28 How To Install and Configure FTP Server on Ubuntu With VSFTPD
Transfer...
SPRING SPECIAL: Buy one E-2388G server, get one of our selected
READ MORE
SPRING SPECIAL: Buy one E-2388G server, get one of our selected
Advanced Package Tool (APT) is a READ MORE