真正解决办法:FTP 执行命令时500 Illegal PORT command

远程登录到服务器,执行dir/ls等命令,一律是:

ftp> ls
500 Illegal PORT command.
ftp> dir
500 Illegal PORT command.

服务器有问题?上网搜索,很多人都人云亦云,自己都没试用。找了半天,终于找到了一个解决办法。即使用quote/passive更改模式:

ftp> quote pasv
227 Entering Passive Mode (192,168,2,2,1111,5555)
ftp> passive
Passive mode on.
ftp> dir
227 Entering Passive Mode (192,168,2,3,117,56)
150 Here comes the directory listing.
drwxr-xr-x    9 0        0             220 Sep 16  2019 apache-tomcat-8.5.46
drwxr-x---    3 0        0              18 Nov 20  2020 apache-tomcat-home
drwxr-xr-x    9 0        0             202 Aug 19  2020 apache-tomcat-plugin_test
drwxr-xr-x    9 0        0             220 Jul 03  2020 apache-tomcat-reader
drwxrwxr-x    9 1123     1123          220 Aug 12  2020 apache-tomcat-temp-test
drwxr-xr-x    9 0        0             220 Jul 03  2020 apache-tomcat-upgrade
drwxr-x---    3 0        0              18 Nov 20  2020 apache-tomcat-wo
226 Directory send OK.

posted @ 2022-10-23 21:38  MasonLee  阅读(147)  评论(0编辑  收藏  举报