$ sudo apt update
$ sudo apt install vsftpd
$ systemctl status vsftpd
$ sudo nano /etc/vsftpd.conf
listen=YES
listen_ipv6=NO
anonymous_enable=NO
local_enable=YES
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
allow_writeable_chroot=YES
$ sudo systemctl restart vsftpd
$ sudo openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /etc/ssl/private/vsftpd.pem -out /etc/ssl/private/vsftpd.pem
$ sudo nano /etc/vsftpd.conf
rsa_cert_file=/etc/ssl/private/vsftpd.pem
rsa_private_key_file=/etc/ssl/private/vsftpd.pem
ssl_enable=YES
$ sudo useradd ftpuser
$ sudo mkhomedir_helper ftpuser
$ sudo passwd ftpuser
$ sudo ufw allow 20/tcp
$ sudo ufw allow 21/tcp
$ sudo ufw disable
$ sudo ufw enable
$ sudo ufw status