我使用FTP而不是隐式SSL来上传一些文件.我遇到以下错误消息
[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.
Run Code Online (Sandbox Code Playgroud)
我可以知道这个错误消息"521 PROT P required"是什么意思?
谢谢
小智 10
键入以下内容:set ftp:ssl-protect-data true
在开始数据传输之前(例如在控制连接之外创建新的数据连接以传输文件或列表),您必须使用命令指定保护级别PROT。主要的保护级别是P受保护(例如 SSL 加密)或C明文(无加密)。服务器会抱怨,因为您没有指定保护级别,因此它不知道您想要如何获取数据。
PROT所有 ftps 客户端都必须执行和使用该命令。