When I tried "0.0.0.0" it worked, but it stopped passive mode working as
the ftp server was offering 0,0,0,0 in the control channel which
obviously won't work.
This might be a bug!
I didn't try "" though.
--
Nick Craig-Wood <ni...@craig-wood.com> -- http://www.craig-wood.com/nick
class CustomFtpHandler(ftpserver.FTPHandler):
def handle(self):
# this is called when client connects
hostip = sock.getsockname()
self.handler.authorizer.setHost(hostip[0])
2011/6/17 Brian Rak <d...@devicenull.org>:
> --
> You received this message because you are subscribed to the "Python FTP server library" project group:
> http://code.google.com/p/pyftpdlib/
> To post to this group, send email to pyft...@googlegroups.com
> To unsubscribe from this group, send email to pyftpdlib-...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/pyftpdlib
It's likely the server was behind a NAT and you didn't specify a
masquerade IP address (FTPHandler.masqueraded_ip attribute).
>>> ftpd1 = ftpserver.FTPServer(address1, ftp_handler) >>> ftpd2 = ftpserver.FTPServer(address2, ftp_handler) >>> ftpd2.serve_forever() # start both servers ....you can do: >>> ftpd1 = ftpserver.FTPServer(address1, ftp_handler) >>> ftpd2 = ftpserver.FTPServer(address2, ftp_handler) >>> ftpserver.FTPServer.serve_forever()
This solves the misleading log:port log and is more intuitive.
It turned out to be a bug in our code with setting masqueraded_ip, so
don't worry about it!
Cheers
Nick