Score:0

VSFTPD not work in delphi application, but fine in Filezilla

mx flag

I'm using UBUNTU SERVER 20.04 in Oracle Cloud with VSFTP 3.0.3.

I can connetct to the FTP server ealisy using filezilla. I can navigate through ftp directories to upload and download files. But my Delphi 7 application (using IDFTP, indy component) can't connect to this ftp server.

Does anyone have any suggestions on how to proceed with this problem?

these are the delphi, linux and ftp settings.

Delphi 7 config

IdFTP1.Username := 'username';
IdFTP1.Password := 'password';
IdFTP1.Host := 'ip';
IdFTP1.Connect;
IdFTP1.Changedir(path);
IdFTP1.Put(line1, name1);
IdFTP1.Disconnect;

VSFTP config

listen=NO
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
xferlog_std_format=NO
log_ftp_protocol=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=NO
user_sub_token=$USER
local_root=/home/$USER/ftp
pasv_enable=YES
pasv_min_port=40000
pasv_max_port=50000
pasv_address=***.**.**.***
userlist_enable=YES
userlist_file=/etc/vsftpd.userlist
userlist_deny=NO

FileZila FTP log

Thu Dec  2 13:03:33 2021 [pid 1092950] CONNECT: Client "::ffff:***.**.***.***"
Thu Dec  2 13:03:33 2021 [pid 1092950] FTP response: Client "::ffff:***.**.***.***", "220 (vsFTPd 3.0.3)"
Thu Dec  2 13:03:33 2021 [pid 1092950] FTP command: Client "::ffff:***.**.***.***", "AUTH TLS"
Thu Dec  2 13:03:33 2021 [pid 1092950] FTP response: Client "::ffff:***.**.***.***", "530 Please login with USER and PASS."
Thu Dec  2 13:03:33 2021 [pid 1092950] FTP command: Client "::ffff:***.**.***.***", "AUTH SSL"
Thu Dec  2 13:03:33 2021 [pid 1092950] FTP response: Client "::ffff:***.**.***.***", "530 Please login with USER and PASS."
Thu Dec  2 13:03:33 2021 [pid 1092950] FTP command: Client "::ffff:***.**.***.***", "USER ftpuser"
Thu Dec  2 13:03:33 2021 [pid 1092950] [ftpuser] FTP response: Client "::ffff:***.**.***.***", "331 Please specify the password."
Thu Dec  2 13:03:33 2021 [pid 1092950] [ftpuser] FTP command: Client "::ffff:***.**.***.***", "PASS <password>"
Thu Dec  2 13:03:33 2021 [pid 1092949] [ftpuser] OK LOGIN: Client "::ffff:***.**.***.***"
Thu Dec  2 13:03:33 2021 [pid 1092951] [ftpuser] FTP response: Client "::ffff:***.**.***.***", "230 Login successful."
Thu Dec  2 13:03:33 2021 [pid 1092951] [ftpuser] FTP command: Client "::ffff:***.**.***.***", "CWD /NFE/3"
Thu Dec  2 13:03:33 2021 [pid 1092951] [ftpuser] FTP response: Client "::ffff:***.**.***.***", "250 Directory successfully changed."
Thu Dec  2 13:03:33 2021 [pid 1092951] [ftpuser] FTP command: Client "::ffff:***.**.***.***", "TYPE I"
Thu Dec  2 13:03:33 2021 [pid 1092951] [ftpuser] FTP response: Client "::ffff:***.**.***.***", "200 Switching to Binary mode."
Thu Dec  2 13:03:33 2021 [pid 1092951] [ftpuser] FTP command: Client "::ffff:***.**.***.***", "PASV"
Thu Dec  2 13:03:33 2021 [pid 1092951] [ftpuser] FTP response: Client "::ffff:***.**.***.***", "227 Entering Passive Mode (0,0,0,0,193,183)."
Thu Dec  2 13:03:33 2021 [pid 1092951] [ftpuser] FTP command: Client "::ffff:***.**.***.***", "STOR test.jpg"
Thu Dec  2 13:03:33 2021 [pid 1092951] [ftpuser] FTP response: Client "::ffff:***.**.***.***", "150 Ok to send data."
Thu Dec  2 13:03:33 2021 [pid 1092951] [ftpuser] OK UPLOAD: Client "::ffff:***.**.***.***", "/NFE/3/test.jpg", 635 bytes, 16.40Kbyte/sec
Thu Dec  2 13:03:33 2021 [pid 1092951] [ftpuser] FTP response: Client "::ffff:***.**.***.***", "226 Transfer complete."
Thu Dec  2 13:03:33 2021 [pid 1092951] [ftpuser] FTP command: Client "::ffff:***.**.***.***", "PASV"
Thu Dec  2 13:03:33 2021 [pid 1092951] [ftpuser] FTP response: Client "::ffff:***.**.***.***", "227 Entering Passive Mode (0,0,0,0,174,195)."
Thu Dec  2 13:03:33 2021 [pid 1092951] [ftpuser] FTP command: Client "::ffff:***.**.***.***", "LIST"
Thu Dec  2 13:03:33 2021 [pid 1092951] [ftpuser] FTP response: Client "::ffff:***.**.***.***", "150 Here comes the directory listing."
Thu Dec  2 13:03:33 2021 [pid 1092951] [ftpuser] FTP response: Client "::ffff:***.**.***.***", "226 Directory send OK."

Dephi FTP log

Thu Dec  2 12:49:57 2021 [pid 1088032] CONNECT: Client "::ffff:***.**.***.***"
Thu Dec  2 12:49:57 2021 [pid 1088032] FTP response: Client "::ffff:***.**.***.***", "220 (vsFTPd 3.0.3)"
Thu Dec  2 12:49:57 2021 [pid 1088032] FTP command: Client "::ffff:***.**.***.***", "USER ftpuser"
Thu Dec  2 12:49:57 2021 [pid 1088032] [ftpuser] FTP response: Client "::ffff:***.**.***.***", "331 Please specify the password."
Thu Dec  2 12:49:57 2021 [pid 1088032] [ftpuser] FTP command: Client "::ffff:***.**.***.***", "PASS <password>"
Thu Dec  2 12:49:57 2021 [pid 1088031] [ftpuser] OK LOGIN: Client "::ffff:***.**.***.***"
Thu Dec  2 12:49:57 2021 [pid 1088033] [ftpuser] FTP response: Client "::ffff:***.**.***.***", "230 Login successful."
Thu Dec  2 12:49:57 2021 [pid 1088033] [ftpuser] FTP command: Client "::ffff:***.**.***.***", "TYPE I"
Thu Dec  2 12:49:57 2021 [pid 1088033] [ftpuser] FTP response: Client "::ffff:***.**.***.***", "200 Switching to Binary mode."
Thu Dec  2 12:49:57 2021 [pid 1088033] [ftpuser] FTP command: Client "::ffff:***.**.***.***", "SYST"
Thu Dec  2 12:49:57 2021 [pid 1088033] [ftpuser] FTP response: Client "::ffff:***.**.***.***", "215 UNIX Type: L8"
Thu Dec  2 12:49:57 2021 [pid 1088033] [ftpuser] FTP command: Client "::ffff:***.**.***.***", "CWD /NFE/3/"
Thu Dec  2 12:49:57 2021 [pid 1088033] [ftpuser] FTP response: Client "::ffff:***.**.***.***", "250 Directory successfully changed."
Thu Dec  2 12:49:57 2021 [pid 1088033] [ftpuser] FTP command: Client "::ffff:***.**.***.***", "PASV"
Thu Dec  2 12:49:57 2021 [pid 1088033] [ftpuser] FTP response: Client "::ffff:***.**.***.***", "227 Entering Passive Mode (0,0,0,0,183,51)."
Thu Dec  2 12:49:57 2021 [pid 1088033] [ftpuser] FTP command: Client "::ffff:***.**.***.***", "STOR test.jpg"
Thu Dec  2 12:50:57 2021 [pid 1088033] [ftpuser] FTP response: Client "::ffff:***.**.***.***", "425 Failed to establish connection."
Thu Dec  2 12:50:57 2021 [pid 1088033] [ftpuser] FAIL UPLOAD: Client "::ffff:***.**.***.***", "/NFE/3/test.jpg", 0.00Kbyte/sec
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.