我正在通过隐式 SSL 使用 FTP 来上传一些文件。 我遇到以下错误消息
[Command] PWD
[Response] 257 "/" is current directory.
[Command] PWD
[Response] 257 "/" is current directory.
[Command] TYPE A
[Response] 200 Type set to A
[Command] PWD
[Response] 257 "/" is current directory.
[Command] PASV
[Response] 227 Entering Passive Mode (10,0,0,19,195,113)
[Command] LIST -aL
[Response] 521 PROT P required
[Command] PWD
[Response] 257 "/" is current directory.
[Command] PASV
[Response] 227 Entering Passive Mode (10,0,0,19,195,114)
[Command] LIST -aL
[Response] 521 PROT P required
[Status] Failed::FTP protocol error. 521 PROT P required.
我可以知道这个错误消息“521 PROT P required”是什么意思吗?
谢谢
输入以下内容: 设置 ftp:ssl-protect-data true
在开始数据传输之前(例如,在控制连接之外创建新的数据连接以传输文件或列表),您必须使用
PROT
命令指定保护级别。主要保护级别为 P
表示受保护(例如 SSL 加密)或 C
表示透明(无加密)。服务器会抱怨,因为您没有指定保护级别,因此它不知道您想要如何获取数据。
所有 ftps 客户端都必须实现和使用
PROT
命令。
MLST 命令无法打开数据连接。为此,需要升级 FTP 服务器或禁用客户端上的 MLST(机器处理列表)。 对于脚本来说, var client = new Rebex.Net.Ftp(); client.EnabledExtensions &= ~FtpExtensions.MachineProcessingList;
对于 SSIS 或任何 BI 工具,DisableMachineProcessingList1