Install FTP Server vsftpd on Ubuntu Server and Configure

---

With this method you can install on ubuntu server 16.04 18.04 20.04 22.04 and between versions.

You can also use this same method to install on Debian Linux.

01. Frstu instalasi paket vsftpd.

sudo apt update
sudo apt install vsftpd

02. Configure FTP Server.

Editing the configuration file:

sudo nano /etc/vsftpd.conf

And add the following code:

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

rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
ssl_enable=YES

pasv_enable=YES
pasv_enable=Yes
pasv_max_port=10090
pasv_min_port=10100

03. Restart the FTP Service.

sudo systemctl restart vsftpd

04. Check Status.

sudo service vsftpd status

05. Configure UFW Firewall.

If you have enabled the UFW firewall, then you need to open the above ports in the firewall with the following command.

sudo ufw allow from any to any port 20,21,10090:10100 proto tcp

More detailed UFW Firewall Installation and setup

06. To check which ports are open on your server.

netstat -tnl

07. Setting Up the User Account.

To create a user account, run the following command:

sudo adduser ftpnic

To do this, run the following command:

sudo mkdir -p /home/ftpnic/ftp

Directory permissions. We want the user to be able to access only their directory:

sudo chown nobody:nogroup /home/ftpnic/ftp
sudo chmod a-w /home/ftpnic/ftp

08. Ftp client.

FileZilla 

---