Question

I am using FTP over implicit SSL to upload some files. I encountered the following error message

[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.

May I know what is this error message "521 PROT P required" saying?

Thanks

Was it helpful?

Solution 2

Before starting a data transfer (e.g. creating a new data connection outside the control connection to transfer files or listing) you have to specify the protection level using the PROT command. The main protection levels are P for protected (e.g. SSL encryption) or C for clear (no encryption). The server complains, because you don't specify a protection level and so it does not know how you want to get your data.

The PROT command must be implemented and used by all ftps clients.

OTHER TIPS

type the following: set ftp:ssl-protect-data true

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top