我试图设置一个带有twisted的简单FTP服务器:
sudo venv/bin/twistd ftp -p 21 -r /home/ftpuser/ftproot/ --auth file:/home/ftpuser/pass.dat
当我从Mac上运行它时,它完美无缺。但是当我在ubuntu盒子上运行扭曲的FTP时,我收到了这个错误。知道可能导致它的原因吗?
[twisted.scripts._twistd_unix.UnixAppLogger#info] reactor class: twisted.internet.epollreactor.EPollReactor.
[-] FTPFactory starting on 21
[twisted.protocols.ftp.FTPFactory#info] Starting factory <twisted.protocols.ftp.FTPFactory instance at 0x7f5d31173f80>
[FTP (ProtocolWrapper),0,100.35.194.233] DTPFactory.setTimeout set to 10 seconds
[FTP (ProtocolWrapper),0,100.35.194.233] DTPFactory starting on 38688
[twisted.protocols.ftp.DTPFactory#info] Starting factory <twisted.protocols.ftp.DTPFactory instance at 0x7f5d311712d8>
[-] timed out waiting for DTP connection
[-] Unexpected FTP error
[-] Unhandled Error
Traceback (most recent call last):
Failure: twisted.protocols.ftp.PortConnectionError: DTPFactory timeout