问题描述
我正在使用FileZilla FTP Server Windows版本。
我写了一个java程序连接到我的FTP服务器,并通过套接字发送FTP原始命令到服务器。
当我发送LIST时,我得到了503错误:
pre $ (000002)2011/6/1 10: 46:56 - (未登录)(127.0.0.1)>已连线,传送欢迎讯息...
(000002)2011/6/1 10:46:56 - (未登入)(127.0.0.1)> 220-FileZilla Server版本0.9.37测试版
(000002)2011/6/1 10:46:56 - (未登录)(127.0.0.1)> 220 - 由Tim Kosse撰写([email protected])
(000002)2011/6/1 10:46:56 - (未登录)(127.0.0.1)> 220请访问http://sourceforge.net/projects/filezilla/
(000002)2011/6/1 10:46:56 - (未登录)(127.0.0.1)> USER ggfan
(000002)2011/6/1 10:46:56 - (未登录)(127.0.0.1)> 331 ggfan
所需的密码(000002)2011/6/1 10:46:56 - (未登录)(127.0.0.1)> PASS *****
(000002)2011/6/1 10:46:56 - ggfan(127.0.0.1)> 230登入
(000002)2011/6/1 10:46:56 - ggfan(127.0.0.1)> LIST
(000002)2011/6/1 10:46:56 - ggfan(127.0.0.1)> 503错误的命令序列。
(000002)2011/6/1 10:46:56 - ggfan(127.0.0.1)> QUIT
(000002)2011/6/1 10:46:56 - ggfan(127.0.0.1)> 221再见
请帮助
最好的问候
我相信为了做数据传输(并且LIST是数据传输命令),您必须发出PORT命令首先建立数据连接。解决这个问题的最好方法是阅读相关规范,或者(更有趣)激活Wireshark并查看使用工作的FTP客户端实际发生的情况。
I am using FileZilla FTP Server windows edition. I wrote a java programe to connect to my FTP server, and send FTP raw commands to the server via socket.when I send "LIST", I got 503 error :
(000002)2011/6/1 10:46:56 - (not logged in) (127.0.0.1)> Connected, sending welcome message...
(000002)2011/6/1 10:46:56 - (not logged in) (127.0.0.1)> 220-FileZilla Server version 0.9.37 beta
(000002)2011/6/1 10:46:56 - (not logged in) (127.0.0.1)> 220-written by Tim Kosse ([email protected])
(000002)2011/6/1 10:46:56 - (not logged in) (127.0.0.1)> 220 Please visit http://sourceforge.net/projects/filezilla/
(000002)2011/6/1 10:46:56 - (not logged in) (127.0.0.1)> USER ggfan
(000002)2011/6/1 10:46:56 - (not logged in) (127.0.0.1)> 331 Password required for ggfan
(000002)2011/6/1 10:46:56 - (not logged in) (127.0.0.1)> PASS *****
(000002)2011/6/1 10:46:56 - ggfan (127.0.0.1)> 230 Logged on
(000002)2011/6/1 10:46:56 - ggfan (127.0.0.1)> LIST
(000002)2011/6/1 10:46:56 - ggfan (127.0.0.1)> 503 Bad sequence of commands.
(000002)2011/6/1 10:46:56 - ggfan (127.0.0.1)> QUIT
(000002)2011/6/1 10:46:56 - ggfan (127.0.0.1)> 221 Goodbye
please help
best regards
I believe that in order to do a data transfer (and LIST is a data transfer command) you must issue a PORT command first to establish the data connection. The best way to figure this out is to either read the relevant spec, or (more fun) fire up Wireshark and see what actually happens using a working FTP client.
这篇关于FTP错误:503错误的命令序列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!