FTP (file transfer protocol) is a network protocol for transferring data/files back and forth between your client (your PC) and the server.  It’s an efficient method for accessing the Linux/Windows server and managing the files via CLI or GUI based programs such as Filezilla.

The other day, I rented a VPS server (Virtual Machine) from a hosting provider called Vultr, I set up fresh Plesk control panel installation on it. Everything was going smooth until I attempted to connect website root using the FTP credentials created from Plesk frontend.

Error: The data connection could not be established: ETIMEDOUT - Connection attempt timed out

Advertisement

The Problem:

The Host IP address, username/password and port (21) was correctly entered, Filezilla could establish the connection to the server but upon “Retrieving Directory Listing” phase, it Timed Out after 20 seconds. I tried both Active and Passive FTP modes, even enabled Keep-Alive commands. The connection did not go through.

Here’s the error log from the FTP client (FileZilla):

Status: Connecting to 64.176.81.131:21...
Status: Connection established, waiting for welcome message...
Status: Initializing TLS...
Status: TLS connection established.
Status: Logged in
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/" is the current directory
Command: TYPE I
Response: 200 Type set to I
Command: PASV
Response: 227 Entering Passive Mode (64,176,81,131,243,9).
Command: MLSD
Error: The data connection could not be established: ETIMEDOUT - Connection attempt timed out
Error: Connection closed by server
Error: Failed to retrieve directory listing

There could also be other error messages such as:

  • Connection Refused
  • Connection Timed Out

The Solution

It seemed that the Plesk was blocking FTP ports 21/20. Therefore it got stuck on Retrieving Directory Listing and times out soon after that. The solution is pretty simple and does not involve fiddling with SSH/bash commands on PuTTy

Note: In this troubleshooting guide, we have used Plesk Web Admin SE, which comes free of charge with Vultr Cloud hosting.

Video Tutorial:

End Result, Problem Fixed:

Written Step by Step Procedure

  1. Login to Plesk panel on port 8443 [https://YourServerIP:8443/login]
  2. Go to Tools and Settings > Updates
  3. Update your Plesk Installation by clicking ‘Install or Upgrade Product
  4. Once the installation is complete, go back to updates page. Click “Add or Remove Components
  5. Expand the Plesk Extensions + icon, and check mark the Plesk Firewall for Install
  6. Click Continue and wait for the installation to complete automatically
  7. Now go back to the Tools and Settings > Updates > Security > Firewall
  8. Click “Enable Firewall Rules Management“, click Enable once again
  9. Wait a few seconds, the firewall rules will be enabled and FTP connection error will be fixed
  10. Head back to the Filezilla Client, enter your FTP Server IP, User/pass. You will now be able to upload/modify files on your VPS machine.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.