I have an older Delphi project where in we use the TIdFTP client. I have been unable to get it to work there so I have started a side project where I can test the component. I am also running a FileZilla FTP server with the minimum TLS version set to 1.2. However when I try to run the List procedure in Delphi I get a response saying
534 Protection level C not allowed
FTP Server log showing the described issue:
26-08-2024 08:32:54 FTP Session 5 127.0.0.1 Command AUTH TLS
26-08-2024 08:32:54 FTP Session 5 127.0.0.1 Response 234 Using authentication type TLS.
26-08-2024 08:32:54 FTP Session 5 127.0.0.1 Command USER test
26-08-2024 08:32:54 FTP Session 5 127.0.0.1 Response 331 Please, specify the password.
26-08-2024 08:32:54 FTP Session 5 127.0.0.1 Command PASS ***
26-08-2024 08:32:54 FTP Session 5 127.0.0.1 Response 230 Login successful.
26-08-2024 08:32:54 FTP Session 5 127.0.0.1... Command FEAT
26-08-2024 08:32:54 FTP Session 5 127.0.0.1... Response 211-Features:
26-08-2024 08:32:54 FTP Session 5 127.0.0.1... Response 211 End
26-08-2024 08:32:54 FTP Session 5 127.0.0.1... Command OPTS UTF8 ON
26-08-2024 08:32:54 FTP Session 5 127.0.0.1... Response 202 UTF8 mode is always enabled. No need to send this command
26-08-2024 08:32:54 FTP Session 5 127.0.0.1... Command TYPE I
26-08-2024 08:32:54 FTP Session 5 127.0.0.1... Response 200 Type set to I
26-08-2024 08:32:54 FTP Session 5 127.0.0.1... Command SYST
26-08-2024 08:32:54 FTP Session 5 127.0.0.1... Response 215 UNIX emulated by FileZilla.
26-08-2024 08:32:54 FTP Session 5 127.0.0.1... Command TYPE I
26-08-2024 08:32:54 FTP Session 5 127.0.0.1... Response 200 Type set to I
26-08-2024 08:32:54 FTP Session 5 127.0.0.1... Command PBSZ 0
26-08-2024 08:32:54 FTP Session 5 127.0.0.1... Response 200 PBSZ=0
26-08-2024 08:32:54 FTP Session 5 127.0.0.1... Command PROT C
26-08-2024 08:32:54 FTP Session 5 127.0.0.1... Response 534 Protection level C not allowed
26-08-2024 08:32:59 FTP Server Status Session 5 ended gracefully.
I have tried changing the settings but no luck.
Delphi Code:
IdFTP Settings:
IdSSLIOHandlerSocketOpenSSL settings:
I have not used Delphi for very long and this is my first time posting here, so let me know if there is anything else you need.
Your server (rightfully) does not allow unencrypted file transfers.
So you need to change the DataPortProtection
property from ftpdpsClear
(PROT C
) to ftpdpsPrivate
(PROT P
).