windows server 系统 开启ftp服务器

描述

       ftp服务器不安全,但是确实是一个传输数据的好工具, 在抛开安全问题情况下,ftp还是很理想的。


这里来介绍下ftp的主动模式和被动模式:

  1. 主动模式:可以这样理解,客服端比较主动,然后主动链接服务器的20端口。
  2. 被动模式:被动模式是后来对ftp的一个改进,在被动模式下,在链接过后,要等服务器生成一个数据传输端口(这个端口是自己设置范围,可以参考博客),然后把这个端口告诉客服端,客服端在连接这个端口。

       其实之前在windows搭建过几次ftp服务器,这次总体上来说也比较顺利。流程可以参考这一篇博客。至此,我用 ftp://localhost:21 访问没得问题。
由于服务器是在线上的云端服务器,所以涉及到端口的映射,下面就是错误操作,我只映射了21端口,错误信息如下:

Status:	Connecting to 服务器ip:21...
Status:	Connection established, waiting for welcome message...
Status:	Logged in
Status:	Retrieving directory listing...
Command:	PWD
Response:	257 "/" is current directory.
Command:	TYPE I
Response:	200 Type set to I.
Command:	PORT 192,168,3,82,133,139
Response:	200 PORT command successful.
Command:	LIST
Response:	150 Opening BINARY mode data connection.
Response:	550 
Error:	Failed to retrieve directory listing

解决方法

这个错误耽搁了我两个小时,查了不少资料, 对ftp有了进一步的认识后。后来回过神来,默默的去映射20端口了 o[×.×]。

猜你喜欢

转载自blog.csdn.net/u012939880/article/details/84790846