Unable to connect to the Plesk server via FTP: ftp: connect: Connection timed

Started by Suhitha, Sep 30, 2025, 05:44 AM

Previous topic - Next topic

Suhitha

Question: Unable to connect to the Plesk server via FTP: ftp: connect: Connection timed out


Symptoms

  • Unable to connect to the server via FTP, the process fails with the error:

227 Entering Passive Mode (203,0,13,2,119,129).
ftp: connect: Connection timed out
Error: Connection timed out after 20 seconds of inactivity Error: Failed to retrieve directory listing

  • The nmap utility shows that the passive port range (49152-65535) is in the closed state:

nmap -p49192,65535 203.0.13.2
Host is up (0.25s latency).
PORT STATE SERVICE

49192/tcp closed unknown
65535/tcp closed unknown

  • In an attempt to manually calculate the result of the passive FTP port((119*256)+129=30593), the value is not within the range (49152-65535)


Cause

The wrong range for passive ports is set in /etc/proftpd.d/55-passive-ports.conf file.


Resolution

1.Log in to the server via SSH

2.Open the /etc/proftpd.d/55-passive-ports.conf file with text editor of your choice, vi for example

3.Change the line with the PassivePorts directive to the following:

PassivePorts 49152 65535

4.Restart xinetd service to apply the changes:

# service xinetd restart