I'm setting up an FTP server using vsftpd. To test it I have made an FTP connection using ftplib:
connection = ftplib.FTP(host)
connection.login(user=username, passwd=password)
And checked that it's connected using:
connection.voidcmd("NOOP")
However, executing nearly anything doesn't seem to work. For instance:
connection.nlst()
Waits forever and then times out.
Connecting through ftp (ubunut) I see the message:
Entering Passive Mode (0,0,0,0,xxx,xxx).
Filezilla does work, how can this be?
The problem is that the passive connection isn't working. This can be because:
listen
and listen_ipv6
are defined in the vsftpd.confJust in case, also check if the passive ports aren't opened under the firewall rules