经常发现有的网站的FTP不能连接上,可以登陆,但是总是停在某个地方.如用gFTP:
220---------- Welcome to Pure-FTPd [TLS] ----------
220-You are user number 2 of 250 allowed.
220-Local time is now 01:16. Server port: 21.
220 You will be disconnected after 4 minutes of inactivity.
USER xxxxx
331 User xxxxx OK. Password required
PASS xxxx
230-User xxxxx has group access to: xxxxx
230 OK. Current restricted directory is /
TYPE I
200 TYPE is now 8-bit binary
CWD /
250 OK. Current directory is /
PASV
227 Entering Passive Mode (66,29,3,66,231,25)
LIST
就停在上面一行.
试过disable Passive Mode,结果是一样.如下:
220---------- Welcome to Pure-FTPd [TLS] ----------
220-You are user number 1 of 250 allowed.
220-Local time is now 01:20. Server port: 21.
220 You will be disconnected after 4 minutes of inactivity.
USER xxxxxx
331 User xxxxx OK. Password required
PASS xxxx
230-User xxxxxx has group access to: xxxxxx
230 OK. Current restricted directory is /
TYPE I
200 TYPE is now 8-bit binary
PWD
257 "/" is your current location
PORT 192,168,42,77,157,42
试过别的如ncFTP, 还有Linux的ftp command,都是同样的结果.
同一个网络,用windows的WS_FTP就没有问题.Log file如下:
220---------- Welcome to Pure-FTPd [TLS] ----------
220-You are user number 2 of 250 allowed.
220-Local time is now 01:22. Server port: 21.
220 You will be disconnected after 4 minutes of inactivity.
USER xxxxxx
331 User xxxxxx OK. Password required
PASS (hidden)
230-User xxxxxx has group access to: xxxxxx
230 OK. Current restricted directory is /
PWD
257 "/" is your current location
Host type
: UNIX (standard)
PORT 192,168,42,17,4,196
200 PORT command successful
LIST
150 Connecting to port 61682
Received 1471 bytes in 0.1 secs, (140.00 Kbps),
transfer succeeded
226-Options: -a -l
226 22 matches total
以上是没有使用Passive Mode.即时是enable Passive Mode, windows下也没有类似的问题.