I have setup an FTPS server on my aws ec2 instance. I am using Apache Commons net to connect programmatically to my server.
try
{
ftps.enterLocalPassiveMode();
ftps.setBufferSize(1000);
ftps.execPROT("P");
if (!ftps.login(username, password))
{
ftps.logout();
error = true;
break __main;
}
}
I cannot retrieve files if I don't set execProt("P"). From their documentation, I see that "P" stands for Private Data Channel Protection Level. What does this mean? Why am I using P instead of "S" or "E"?
The PROT command in ftps can have the values P and C. P stands for private and means that the data connection is encrypted with TLS. C stands for clear and means that the data connection is not encrypted. The values of E (confidential) and S (safe) are defined too but in practice not implemented in FTP servers. For more details see the specification, i.e. RFC 4217.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With