admin backup curl 7 error on ftp

magis010

Verified User
Joined
Dec 5, 2016
Messages
51
hello

after upgrading the os from centos 7 to the latest almalinux the remote backup is getting errors while uploading to ftp

the login and path are correct it does generate a backup folder on the ftp side but the zip files does not get uploaded

Code:
User admin has been backed up. <12:01:03>
ftp_upload.php exit code: 7
ftp_upload.php output: curl: (7) Failed to connect to 62.131.XXX.XXX port 21: Connection refused
curl return code: 7
 <12:01:05>
Please see this URL and check for curl exit code '(7)': https://help.directadmin.com/item.php?id=2127
User zuidit has been backed up. <12:01:36>
ftp_upload.php exit code: 7
ftp_upload.php output: curl: (7) Failed to connect to 62.131.XXX.XXX port 21: Connection refused
curl return code: 7
 <12:01:38>
Please see this URL and check for curl exit code '(7)': https://help.directadmin.com/item.php?id=2127

Although a backup error has occurred, the upload of valid backups would have still been attempted to ftp://62.131.XXX.XXX/homes/directadmin/directadmin/users/04-05-2022-2 <12:01:38>
* Also port 21 is only opened to the directadmin server


This is the path on the ftp side as you see the folder does get created but no files inside

Schermafbeelding 2022-05-04 145857.png


What is the trick to get this back to work?

On the almalinux gui side i am able to open the ftp on the same login as the directadmin panel knows the login
 
Can you check the following:

- Allow your IP 62.131.XXX.XXX in CSF (which is enabled by default on recent DA installs)
- if you still cannot connect, check permissions of /home/tmp (chmod 1777 /home/tmp), this might explain why files aren't being uploaded
 
Can you check the following:

- Allow your IP 62.131.XXX.XXX in CSF (which is enabled by default on recent DA installs)
- if you still cannot connect, check permissions of /home/tmp (chmod 1777 /home/tmp), this might explain why files aren't being uploaded
Thanks for this great response it is working now!

also the folder permissions where 1777 idk what that is doing its things about haha

i am so happy now so the backups flow now offsite as a failsafe after 1 week of not doing it :)
 
also the folder permissions where 1777 idk what that is doing its things about haha
It's normal to have that chmod 1777.

Just for anybody also reading this....
Be aware that if you allow that 62.131.x.x ip in CSF, from that ip any hack attempts can be done without CSF take action against it if anything goes wrong.
I never whitelist anything in CSF except my home ip from which I administer CSF.

A better option would be to investigate why this happens. If whitelisting solves the issue. You know it's a firewall issue. Then you should check if the necessary ports in the firewall are opened.
Like it also says in the docs. Like outgoing on the DA server needs also to be opened 20, 21 for FTP traffic and 35000:39000 for PASV traffic.

So one can use both methods, but those who like more security should add as little as possible in the csf allow list.
 
i guess its fine to have a few minor bugs after upgrading from centos7 to almalinux all my configs went rogue haha php gave errors about service not availible but i had to do ofcourse a recompile and it all came back exept the remote ftp backup.

so this is figured out lets hope the webserver runs now fine without any issue :)
 
Back
Top