giampaolo / pyftpdlib

Extremely fast and scalable Python FTP server library
MIT License
1.68k stars 263 forks source link

Disable passive mode #555

Open kruserr opened 3 years ago

kruserr commented 3 years ago

Hello,

I find myself running behind a firewall where only ports 20-21 are available. I am using pyftpdlib 1.5.6 and python ftplib as the client.

Attempting to send data to the server i get the following error.

Passive data channel timed out.

I found that forcing the client to use active mode solves the issue

ftp.set_pasv(False)

However i would like to not have my clients forced to disable passive mode themselves, and rather disable it on the server.

How would one achieve this.

ExtraMobs commented 2 years ago

I has the same problem :D

edit1: i was using socket lib so their error is getting my ipv4, and the error always varies from case to case, i thought it was something from 'pyftplib'.