I'm using active mode for transfers with my FTP server. In WinSCP and FileZilla there is an option for network external IP. If I give my IP in those boxes, I'm able to connect to the FTP server with active mode. But in Python I don’t know how to assign that IP. I can assign ftp.setpasv(false)
, but it's not retrieving directories but shows you are logged in. But when try to run ftp.dir()
, it throws error
Exception has occurred: TimeoutError [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. This is the error. I tried to set source address via ftp.connect function, but its not working, i tried to ignore return ip like some answers i found in stack overflow, but not working .