There seems to be quite a lot of posts about FTP login via vsftpd but none worked for me. I'm aware that FTP is not really secure but I have an uploader page which uses FTP to upload content to server. This content is not executed anywhere but just stored and I use clamAV for virus scanning these content, just in case.
Here's the commands that I tried.
sudo useradd -d /home/publicftp -m publicftp
Then vsftpd config
local_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
All other properties are commented out. My problem is that from filezilla if I use port 21 (FTP) connection is timed out. However, if I use port 22 (SFTP), then publicftp can connect and access all folders - meaning he's not jailed.