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.
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
- Login to Plesk panel on port 8443 [https://YourServerIP:8443/login]
- Go to Tools and Settings > Updates
- Update your Plesk Installation by clicking ‘Install or Upgrade Product‘
- Once the installation is complete, go back to updates page. Click “Add or Remove Components“
- Expand the Plesk Extensions + icon, and check mark the Plesk Firewall for Install
- Click Continue and wait for the installation to complete automatically
- Now go back to the Tools and Settings > Updates > Security > Firewall
- Click “Enable Firewall Rules Management“, click Enable once again
- Wait a few seconds, the firewall rules will be enabled and FTP connection error will be fixed
- 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.