Support

Akeeba Backup for Joomla!

#38664 "Test FTP Connection" fails on certain server (Plesk Obsidian 18.0.50)

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
4.2.8
PHP version
8.0.28
Akeeba Backup version
9.5.0

Latest post by maggus86 on Monday, 06 March 2023 18:19 CST

maggus86

Dear Nicholas,

as mentionend in the title the "Test FTP Connection" button does not work properly since 1 or 2 weeks. It throws the following message:

 

AJAX Error

An error has occurred while waiting for an AJAX response:

AJAX Loading Error
HTTP Status: 0 ()
Internal status: timeout
XHR ReadyState: 4
Raw server response:

 

As you can see there is no status code and no server response. But the post processing works as expected. So the backup is stored correctly but the diagnosis button has some issue. For some reason this incident only occurs on my own virtual server that runs on Debian 11.6 and Plesk Obsidian 18.0.50. FTP and FTPS support is enabled, I cannot find any misconfiguration of the PHP module. In former versions of Akeeba Backup the button has worked as expected. Unfortunately I can't distinguish if it is a matter of the new Plesk, PHP or Akeeba Version.

It's just on my Plesk server, so it might be Plesk. But on other Plesk servers, this issue does not occur. So it might not be Plesk but a PHP misconfiguration. But I haven't change my PHP configuration in any way so there might be some issue on Akeeba.

What makes this error even worse is the case that when disabling "Report external IP in PASV mode" on my Synology FTP server, the Akeeba diagnosis button works well again but storing the backup on the ftp server does not work any more time.

Another problem for Akeeba could be that there are no "Write" permissions on the FTP root folder, only on the FTP subdirectory. That's why Akeeba has always reported that it could connect to the ftp server but could not store any test file. This behaviour is expected. Moreover there is no "Read" permission on the FTP subdirectory (only write files) because I don't want anybody who gains access to be able to read and download any backup archives. There is just a subdirecty you can write files into.

This ftp server configuration is quite a bit tricky for your Akeeba FTP diagnosis button but it has always shown the correct diagnosis on previous Akeeba versions. Unfortunately, I don't have any idea why this button is not working any more in Akeeba version 9.5.0 and exclusively on my own server.

Is there some code change that might be responsible for this? Do you have any idea?

Thank you very much for your help!

nicholas
Akeeba Staff
Manager

We have not changed the way the Test FTP Connection feature works in about a year. However, about two weeks ago there was a new version of Synology's DSM (for those who read this public ticket: that's the Linux-based Operating System for Synology NAS). I wouldn't be surprised if this is what caused the problem. Synology's FTP implementation is a bit weird and your setup adds additional challenges.

Your setup cannot work with the Test FTP Connection button as you don't have read permissions. If you connect it would report that it could connect and upload a file, but not read it. Moreover, the feature to fetch the backup back to the server won't work. I am not sure if remote quotas and deleting remotely stored files would work either as I don't know if PHP's FTP implementation tries to issue an FTP LIST command before DELE. So I'm not sure if it's even worth trying to troubleshoot the timeout since even addressing it you would still get a misleading error message due to the way you have set up your FTP server.

Further to that and as I said, Synology's FTP is a bit weird and doesn't work very well with PHP's FTP implementation. You need to use FTP over cURL for it to work correctly, always using Passive mode and the passive mode workaround option.

So, let's not waste time trying to troubleshoot something which doesn't make sense. Even more so when Synology NAS offers SFTP which is far more secure. You can even set up Akeeba Backup to use SFTP with an SSH certificate file instead of a password for even better security. Remember that Synology has two SSH ports, 22 and 2323 by default. SFTP can be over either port, SSH login is only over port 2323. This means that exposing port 22, having really long passwords and using SSH certificates to give login access is a far more secure solution to plain old FTP(S). That's how I am using my Synology NAS to take (automated daily, and manual) backups of my dev sites. 

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

maggus86

Thank you very much for your detailed information! I will test all the mentioned possibilities with my FTP-Server :-)

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!