我在Ubuntu 12.04 LTS中设置了FTP服务器.
现在,当我尝试通过命令行ftp.exe从Windows 7连接到FTP服务器时,我成功连接但我无法获取目录列表.我收到错误
200 PORT command successful. Consider using PASV. 425 Failed to establish connection.
在使用ls之前尝试使用passive命令.
从FTP客户端,要检查FTP服务器是否支持被动模式,请在登录后键入quote PASV.
以下是具有被动模式打开和关闭的vsftpd服务器的连接示例
vsftpd with pasv_enable = NO:
# ftp localhost Connected to localhost.localdomain. 220 (vsFTPd 2.3.5) Name (localhost:john): anonymous 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> quote PASV 550 Permission denied. ftp>
vsftpd with pasv_enable = YES:
# ftp localhost Connected to localhost.localdomain. 220 (vsFTPd 2.3.5) Name (localhost:john): anonymous 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> quote PASV 227 Entering Passive Mode (127,1,173,104). ftp>