Stuart Byrne · Jun 23, 2020

FTP(S) Inbound Adapter connecting and disconnecting with "PROT P" error

Dear Community,

I need to collect a file from an FTP server over FTPS.

I have the :

  • credentials saved correctly
  • correct host and port informatoin
  • correct filepath I am trying to collect from
  • I have setup the SSL configuration in  System > Security Management > SSL/TLS Configurations and this tests sucessfully

When I run the business service to connect it connects, but soon after connecting it fails to open the directory:

Type Time Text  ID
Error 2020-06-23 14:42:06.542 ERROR <Ens>ErrFTPListFailed: FTP: Failed List for *.txt (msg='PROT P required',code=521)  36581958
Info 2020-06-23 14:42:06.277 ConfigItem 'ClincalVision Results from LDH FTP' (ClinicalVision.Service.LDHFTPService) started in job 31540  36581957
Info 2020-06-23 14:42:06.277 Connected to FTP Server '<server address>:<port>/CV_L&D_FTPS/SSL='FTPS_LDH*' at path '/ENHT-TIE' using Credentials 'CV_L&D_FTPS'

I have changed the server address in the logs

I have tested the credentials with a certificate key from the server and the WinSCP client can collect the file successfully.

I've seen in another post we need to state the PROT P protocol, but the invoked commands to not exist in the EnsLib.FTP.InboundAdatper or the Enslib.FTP.Common classes.







3 0 3 136


I've tried testing in the console using the %Net.FTP Command.

I ran the following (server name substituted):

do ftpcall.Connect("",username,pwd,"990")

I did a zwrite and found the connection was sucessful and on:

I got the following for the Return message:

write !, ftpcall.ReturnMessage
 MLST type*;size*;modify*;

This says it supports PROT protocol, but I am not sure from the %Net.FTP documentation how to set this feature.

Once you are connected use ftpcall.sendCommand("PROT P")

Thanks David, your suggestion and some advice via the WRC enabled me to connect over FTPS and collect the text reports from the 3rd party.