Support

Akeeba Backup for Joomla!

#41035 FTP not uploading, but Test OK

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
3.10.12
PHP version
7.4.33
Akeeba Backup version
8.3.3

Latest post by nicholas on Tuesday, 27 August 2024 07:52 CDT

solutionit

Hello,

i configured everything like i found in forum, and documentation, FTP Test says everything is OK, also a subfolder was created automatically by akeeba, but it do not upload the jpa files... even not when i split to 10MB... (in that case the jpa file only has 1,5MB)

log attached.

already asked provider too if there is something blocked - but awaiting reply ;)

nicholas
Akeeba Staff
Manager

What I see in the log is that after 30 seconds the remote FTP server closes the connection.

Have you tried enabling FTP passive mode?

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!

solutionit

Passive mode is enabled yes, so now i disabled it, but result is the same.

both servers has 1GBit connection, so 1,5MB in 30 seconds shouldn be a big problem i think :D

it just does not start transfering the file.

Β 

nicholas
Akeeba Staff
Manager

FTP works by using communications in two ports, the control channel and the data channel.

The control channel is always on the same, predefined port, the default being 21. Since it's a well-known port, it is easy for the web server's host to open that port in their firewall.

Data transfer, however, takes place over the data channel. This is a randomly assigned port. Naturally, you can't open all possible ports on the firewall because you'd then have no firewall. What actually happens is that there is a kernel driver which figures out which port is going to be used and opens it temporarily in the firewall. For more technical info, see https://unix.stackexchange.com/questions/587965/how-is-netfilter-able-to-track-the-out-of-band-data-connections-of-ftp-to-be-inΒ 

If your web host has not set up their firewall correctly – either by not using a conntrack rule in the firewall, or by not loading the kernel module – any attempt to upload to an FTP server from that host will fail.

And yes, in this case the FTP connection test would succeed, but the transfer would fail. As I mentioned earlier, connecting and logging into an FTP server (and creating / renaming / removing directories, moving / deleting files, and generally everything except file upload and download) takes place over the control channel on the well-known TCP/IP port. The FTP connection test only tries to open the connection to the control channel, log into the server, and change into the directory you have specified. That's all it can check. This is not blocked by your web host, therefore it succeeds.

The part that fails is the data transfer, communicating over the data channel. This appears to be filtered by your web server host's firewall which is why the connection times out. When we say that the connection times out we mean that the connection was never established. Nothing was transferred. The network speed of your servers is irrelevant.

Go with this information to both of your hosts and see which one is blocking the connection.

And, please, do make sure that you are using Passive mode. Doing the opposite will definitely not work on a server with a properly configured firewall. That's why I asked that question first :)

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!

solutionit

Provider thins same :) and will open my dynamic ports for me - think it will work

nicholas
Akeeba Staff
Manager

Alright :)

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!

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!