I set up the configuration of vsftpd as follows:
listen=NO
listen_ipv6=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
ssl_enable=YES
user_sub_token=$USER
local_root=/var/www/web-moc/wordpress
userlist_enable=YES
userlist_file=/etc/vsftpd.user_list
userlist_deny=NO
allow_writeable_chroot=NO
Then I ran the filezilla to connect to the vsftpd with the following parameters:
host: 52.52.40.248
username: ftp_user
password: XXXXXXXX
port: 20
press "quickconnect"`
It showed the following messages
Status: Connecting to 52.52.40.248:21...
Status: Connection established, waiting for welcome message...
Status: Initializing TLS...
Status: Verifying certificate...
Status: TLS connection established.
Status: Server does not support non-ASCII characters.
Status: Logged in
Status: Retrieving directory listing...
Status: Server sent passive reply with unroutable address. Using server address instead.
Command: LIST
Error: Connection timed out after 20 seconds of inactivity
Error: Failed to retrieve directory listing
It could connect but it failed to execute "list" command and timed out. I was expecting the "list" command should be executed successfully. However, I was able to connect twice after the server was rebooted ?? It listed the directory of the login directory /var/www/web-moc/wordpress/.
Can anyone please let me know what the problem was? I would very appreciate your helps.
Thanks,
Andrew