cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

FTP CPI Connectivity failed: SOCKS5 command failed with status: FORBIDDEN

MohitSharma6
Explorer
0 Likes
2,723

Hello Experts,

I’m setting up connectivity from SAP CPI to a local FTP server. The TCP connection from the Cloud Connector to the FTP server is working, and the connection is reachable.
The connectivity test from SAP CPI succeeds when "Check Directory Access" is off, but when enabled, I get the error: java.net.SocketException: SOCKS5 command failed with status: FORBIDDEN.

Similarly, when pushing a file through CPI interface, I receive:
org.apache.camel.component.file.GenericFileOperationFailedException: File operation failed: 229 Entering Extended Passive Mode (|||65087|) SOCKS5 command failed with status: FORBIDDEN.

I checked SAP Note 0003076681, which mentions ensuring passive mode is enabled and configuring the data port range. The FTP admin confirmed passive mode is enabled but couldn’t share the port range. I’ve only configured port 20 in the Cloud Connector, without a port range. What could be the issue? Do I need to configure a port range, or is there something else required?directoryenabled.pngdirectory_diabled.png

Thanks and Regards,

Mohit

Accepted Solutions (1)

Accepted Solutions (1)

FelipeRodriguez
Discoverer

Hello, 

I had the same issue and resolved it as follow (I am aware that you already confirmed passive mode is enabled)

1.- Checking if passive mode is enabled 

2.- Getting the port range for passive mode. This is mandatory without this info it won't work, so your FTP admin should be able to provide that info. For Linux, there is a "ftpd" conf file in /etc where you can check the range, My scenario was with Linux. 

3.- In cloud connector you need two entries: 

            a) One entry with the port range of passive mode 

            b) additional entry for port 21 (normal FTP port) --> This is the control connection 

FelipeRodriguez_0-1738346629109.png

That should do it, it worked for me. 

Good luck. 

Kind regards! 

Ryan-Crosby
Active Contributor
I can confirm the same thing worked for us.
MohitSharma6
Explorer
0 Likes
Thanks for your solution! I had also identified the issue— in my case, the FTP admin hadn't set any range. I configured it from 0 to 65K in CC(though I understand that a defined range would be a more secure and sustainable approach), and it started working after that.

Answers (0)