Applicable to:
- Plesk for Linux
- Plesk for Windows
Symptoms
-
It is not possible to connect to a Plesk server (or if connected, copy files) via FTP in the passive mode. One of the following error messages appears during connection (Error message varies depending on FTP client):
PLESK_INFO: 530 Login incorrect.
Login failed.
PLESK_INFO: ftp: connect: Connection refused
PLESK_INFO: Response: 227 Entering Passive Mode (203,0,113,111,250,241).
...
Error: Connection timed out after 20 seconds of inactivity
Error: Failed to retrieve directory listing
PLESK_INFO: ftp: connect: Connection timed out
PLESK_INFO: 425 Can't open data connection.
PLESK_INFO: An error occurred opening that folder on the FTP server. Make sure you have permission to access that folder. The operation timed out
PLESK_INFO: Error listing directory '/httpdocs'. Transfer channel can't be opened. Reason: No connection could be made because the target machine actively refused it. Could not retrieve directory listing
PLESK_INFO: Connecting data socket to (203.0.113.2) port 39383
Socket error (Connection timed out) - reconnecting -
It is not possible to get a directory listing by FTP using Secured TLS: the connection establishes but directory listing does not work. The following errors appear in
/var/log/secure
:CONFIG_TEXT: pam_env(proftpd:setcred): Unable to open config file: /etc/security/pam_env.conf: Permission denied
pam_systemd(proftpd:session): Failed to connect to system bus: Permission denied
pam_listfile(proftpd:auth): Couldn't open /etc/ftpusers
Cause
The passive port range (by default, 49152-65535) is not properly configured.
Resolution
Configure the passive port range:
Plesk for Linux
Plesk for Windows Server
Comments
10 comments
i am having the same issue: shows Network error: connection refused!
Is it secure to open ports for passive-ports??
any one have the correct solution.
Hello lostadmin
Thank you for the information.
@Ameenullah S yes, it is secure
@Robert Ricci could you please provide me with more details on that?
Fabien Galiana If you have a dedicated cloud server then you must have a firewall between your server and plesk environment different than your linux firewall. When you login to your ionos account you can reach this firewall interface. With this interface you can control the open ports but here the problem begins. Because you can open no more than 15 ports so you need to contact IONOS tech stuff to make the ports between 49152-65535 open. Unfortunately without these ports open, you can not use custom ftp accounts. You are bound to use the sftp user for your connections which is not suitable if you have clients on your server.
Hope it was useful for you because I know how hard it was for me to figure it out with IONOS. Good luck!
This article must be the most obscure article of all. I have an IONOS cloud dedicated server with Plesk installed. I'm having problems with connecting using FTP even if I created an ftp account through Plesk. As a side note, I can connect using sftp using my default domain user but I can not connect using other ftp users that I created. This article should have been clearer because the problem is a bit obscure in its nature.
This falls short of a complete resolution.
Hello Ivan Postnikov
I solved the problem contacting IONOS, somehow they restricted the port configurations. By default they configure their own firewall. I knew it but I couldn't configure the passive ports. If I were this article's writer, I would add IONOS to the article since they were one of the biggest cloud service provider in Europe (my client is from Germany). I contacted them and there was no plesk issue. By the way I know that sftp and ftp are completely different protocols.
Thanks.
Hello lostadmin
Thank you for the feedback.
SFTP is a different protocol based on SSH.
The FTP issue requires additional investigation. Consider submitting a support request directly to us or to our partner, in case the license was purchased from one of them.
hello ! how did you solve this issue with IONOS ?! I am spending days with them and they are completly unable so solve this issue. not active or passive ftp is working. only SFTP.
Please sign in to leave a comment.