Additional Backup Destinations - Can't connect to FTP

wonder_wonder

Well-Known Member
Jan 16, 2019
51
24
8
Spain
cPanel Access Level
Root Administrator
Hello.
I want create, in configuration Backups, a Additional Desination via FTP.
I config the ip of the ftp server (is my router of my house), username and password.
Also, set the folder path, with "/" and the end, and without "/" at the end.
Always, I have the same error when click in save and validate:

Error: Validation for transport “myuser” failed: Could not upload test file: Permission denied.

I can connect fine to my FTP out of my house.

Also, via Terminal in WHM, can connect via FTP to my FTP server, can read and writte.

I have been trying for several days to find out the problem to correct it, but I am not able ...

Thanks and regards!
 

wonder_wonder

Well-Known Member
Jan 16, 2019
51
24
8
Spain
cPanel Access Level
Root Administrator
Hello @cPanelLauren !!
No error logs, logs of backup are done because local backups work fine, is in the ftp backup, this are the logs:

Hello
Is anything more detailed logged in the backup logs? They're located at
Code:
/usr/local/cpanel/logs/cpbackup/
This is the log:
Code:
[2019-02-22 06:30:02 +0100] info [backup] Setting I/O priority to reduce system load: best-effort: prio 6
[2019-02-22 06:30:02 +0100] info [backup] Pruning metadata for backup at /backup/2019-02-22
[2019-02-22 06:30:02 +0100] info [backup] Creating metadata index for backup at /backup/2019-02-22
[2019-02-22 06:30:02 +0100] info [backup] Hard Linking available on "/backup"
[2019-02-22 06:30:02 +0100] info [backup] Running dir & file backup with target : /backup/2019-02-22/system
/usr/bin/gtar: Removing leading `/' from member names
/usr/bin/gtar: Removing leading `/' from member names
/usr/bin/gtar: Removing leading `/' from member names
/usr/bin/gtar: Removing leading `/' from member names
/usr/bin/gtar: Removing leading `/' from member names
/usr/bin/gtar: Removing leading `/' from member names
/usr/bin/gtar: Removing leading `/' from member names
/usr/bin/gtar: Removing leading `/' from member names
/usr/bin/gtar: Removing leading `/' from member names
/usr/bin/gtar: Removing leading `/' from member names
/usr/bin/gtar: /var/cpanel/dnsadmin/sock: socket ignored
/usr/bin/gtar: /var/cpanel/php-fpm/myuser/sock: socket ignored
/usr/bin/gtar: /var/cpanel/php-fpm/cpanelroundcube/sock: socket ignored
/usr/bin/gtar: /var/cpanel/php-fpm/cpanelphpmyadmin/sock: socket ignored
/usr/bin/gtar: Removing leading `/' from hard link targets
/usr/bin/gtar: Removing leading `/' from member names
/usr/bin/gtar: Removing leading `/' from member names
/usr/bin/gtar: Removing leading `/' from member names
[2019-02-22 06:30:37 +0100] info [backup] System backups will not be uploaded to any remote destinations.
[2019-02-22 06:30:37 +0100] info [backup] Running account backup with target : /backup/2019-02-22/accounts
[2019-02-22 06:30:37 +0100] info [backup] checking backup for myuser
[2019-02-22 06:30:37 +0100] info [backup] Backups ARE enabled for myuser
[2019-02-22 06:30:37 +0100] info [backup] Calling pkgacct under cpuwatch to backup user “myuser”
[2019-02-22 06:30:37 +0100] pkgacct started.
[2019-02-22 06:30:37 +0100] pkgacct version 10 - user : myuser - tarball: 1 - target mysql : default - split: 0 - incremental: 0 - homedir: 1 - mailman: 1 - backup: 1 - archive version: 4 - running with uid 0
[2019-02-22 06:30:37 +0100] pkgacct using '/usr/local/cpanel/3rdparty/bin/pigz -6 --processes 1 --blocksize 4096 --rsynuser' to compress archives
[2019-02-22 06:30:37 +0100] pkgacct working dir : /backup/2019-02-22/accounts/myuser
[2019-02-22 06:30:37 +0100] Copying Reseller Config...[2019-02-22 06:30:37 +0100] Done
[2019-02-22 06:30:37 +0100] Copying Suspension Info (if needed)...[2019-02-22 06:30:37 +0100] Done
[2019-02-22 06:30:37 +0100] Copying installed SSL certificates and keys...[2019-02-22 06:30:37 +0100] Performing “ApacheTLS” component....
[2019-02-22 06:30:37 +0100] Completed “ApacheTLS” component.
[2019-02-22 06:30:37 +0100] Done
[2019-02-22 06:30:37 +0100] Copying Domain Keys....[2019-02-22 06:30:37 +0100] Done
[2019-02-22 06:30:37 +0100] Copying Counter Data....[2019-02-22 06:30:37 +0100] Done
[2019-02-22 06:30:37 +0100] Copying Bandwidth Data....[2019-02-22 06:30:37 +0100] Performing “Bandwidth” component....
Summary databases … done!
[2019-02-22 06:30:39 +0100] Completed “Bandwidth” component.
[2019-02-22 06:30:39 +0100] Done
[2019-02-22 06:30:39 +0100] Copying Dns Zones.......myuser.com...[2019-02-22 06:30:39 +0100] Done
[2019-02-22 06:30:39 +0100] Copying Mail files....[2019-02-22 06:30:39 +0100] Done
[2019-02-22 06:30:39 +0100] Copying proftpd file....[2019-02-22 06:30:39 +0100] Done
[2019-02-22 06:30:39 +0100] Performing “Logs” component....
...log file sizes [71006644 byte(s)]............
...myuser.com......myuser.com-ssl_log......myuser.com-bytes_log......ftp.myuser.com-ftp_log...[2019-02-22 06:30:39 +0100] Completed “Logs” component.
[2019-02-22 06:30:39 +0100] Copy userdata...[2019-02-22 06:30:39 +0100] Done
[2019-02-22 06:30:39 +0100] Copy custom virtualhost templates............
[2019-02-22 06:30:39 +0100] Done
[2019-02-22 06:30:39 +0100] Copying mailman lists and archives....Done copying mailman lists and archives.
[2019-02-22 06:30:39 +0100] Copying homedir.............
[2019-02-22 06:30:41 +0100] Done
[2019-02-22 06:30:41 +0100] Fixing up EA4 .htaccess blocks: /home/myuser/public_html/.htaccess  Done.
[2019-02-22 06:30:42 +0100] Performing “Postgresql” component....
[2019-02-22 06:30:42 +0100] Completed “Postgresql” component.
[2019-02-22 06:30:42 +0100] Performing “Mysql” component....
[2019-02-22 06:30:42 +0100] Determining mysql dbs...Load watching suspended due to SIGUSR1
[2019-02-22 06:30:42 +0100] ...mysqldump version: 5.7.25...[2019-02-22 06:30:42 +0100] ...mysql version: 5.7...[2019-02-22 06:30:42 +0100] Saving mysql privs...[2019-02-22 06:30:42 +0100] Done
[2019-02-22 06:30:42 +0100] ...Done
[2019-02-22 06:30:42 +0100] Storing mysql dbs............
forocabl_vbuservb.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
[2019-02-22 06:35:15 +0100] (7114493988 bytes)
[2019-02-22 06:35:15 +0100] ...Done
[2019-02-22 06:35:15 +0100] Completed “Mysql” component.
[2019-02-22 06:35:15 +0100] Performing “MysqlRemoteNotes” component....
Load watching resumed due to SIGUSR2
cpuwatch (Fri Feb 22 06:35:15 2019): System load is currently 3.27; waiting for it to go down below 1.75 to continue …
cpuwatch (Fri Feb 22 06:36:11 2019): System load is currently 1.74, which is below the threshold of 1.75. Continuing …
[2019-02-22 06:36:11 +0100] Completed “MysqlRemoteNotes” component.
[2019-02-22 06:36:11 +0100] Copying cpuser file.......[2019-02-22 06:36:11 +0100] Done
[2019-02-22 06:36:11 +0100] Copying crontab file.......[2019-02-22 06:36:11 +0100] Done
[2019-02-22 06:36:11 +0100] Performing “Quota” component....
[2019-02-22 06:36:11 +0100] Completed “Quota” component.
[2019-02-22 06:36:11 +0100] Performing “Integration” component....
[2019-02-22 06:36:11 +0100] Completed “Integration” component.
[2019-02-22 06:36:11 +0100] Performing “AuthnLinks” component....
[2019-02-22 06:36:11 +0100] Completed “AuthnLinks” component.
[2019-02-22 06:36:11 +0100] Performing “APITokens” component....
[2019-02-22 06:36:11 +0100] Completed “APITokens” component.
[2019-02-22 06:36:11 +0100] Performing “AutoSSL” component....
[2019-02-22 06:36:11 +0100] Completed “AutoSSL” component.
[2019-02-22 06:36:11 +0100] Storing Subdomains....
[2019-02-22 06:36:11 +0100] Done
[2019-02-22 06:36:11 +0100] Storing Parked Domains....
[2019-02-22 06:36:11 +0100] Done
[2019-02-22 06:36:11 +0100] Storing Addon Domains....
[2019-02-22 06:36:11 +0100] Performing “Password” component....
[2019-02-22 06:36:11 +0100] Completed “Password” component.
[2019-02-22 06:36:11 +0100] Performing “DigestShadow” component....
[2019-02-22 06:36:11 +0100] Completed “DigestShadow” component.
[2019-02-22 06:36:11 +0100] Copying shell.......[2019-02-22 06:36:11 +0100] Done
[2019-02-22 06:36:11 +0100] Performing “PublicContact” component....
[2019-02-22 06:36:11 +0100] Completed “PublicContact” component.
[2019-02-22 06:36:11 +0100] Performing “MailLimits” component....
[2019-02-22 06:36:11 +0100] Completed “MailLimits” component.
[2019-02-22 06:36:11 +0100] Creating Archive ..............cpuwatch (Fri Feb 22 06:36:56 2019): System load is currently 1.83; waiting for it to go down below 1.75 to continue …
cpuwatch (Fri Feb 22 06:37:27 2019): System load is currently 1.55, which is below the threshold of 1.75. Continuing …
..........cpuwatch (Fri Feb 22 06:38:11 2019): System load is currently 1.83; waiting for it to go down below 1.75 to continue …
cpuwatch (Fri Feb 22 06:38:42 2019): System load is currently 1.19, which is below the threshold of 1.75. Continuing …
..............................cpuwatch (Fri Feb 22 06:39:56 2019): System load is currently 1.86; waiting for it to go down below 1.75 to continue …
cpuwatch (Fri Feb 22 06:40:51 2019): System load is currently 1.69, which is below the threshold of 1.75. Continuing …
..........cpuwatch (Fri Feb 22 06:41:31 2019): System load is currently 1.82; waiting for it to go down below 1.75 to continue …
cpuwatch (Fri Feb 22 06:42:02 2019): System load is currently 1.43, which is below the threshold of 1.75. Continuing …
..........cpuwatch (Fri Feb 22 06:42:16 2019): System load is currently 2.13; waiting for it to go down below 1.75 to continue …
cpuwatch (Fri Feb 22 06:42:47 2019): System load is currently 1.62, which is below the threshold of 1.75. Continuing …
..........
..............................cpuwatch (Fri Feb 22 06:44:46 2019): System load is currently 1.92; waiting for it to go down below 1.75 to continue …
cpuwatch (Fri Feb 22 06:45:17 2019): System load is currently 1.57, which is below the threshold of 1.75. Continuing …
..........cpuwatch (Fri Feb 22 06:45:56 2019): System load is currently 1.78; waiting for it to go down below 1.75 to continue …
cpuwatch (Fri Feb 22 06:46:27 2019): System load is currently 1.28, which is below the threshold of 1.75. Continuing …
........................................
........................................cpuwatch (Fri Feb 22 06:50:31 2019): System load is currently 1.98; waiting for it to go down below 1.75 to continue …
cpuwatch (Fri Feb 22 06:51:02 2019): System load is currently 1.50, which is below the threshold of 1.75. Continuing …
....................
[2019-02-22 06:51:15 +0100] Done
[2019-02-22 06:51:15 +0100] pkgacctfile is: /backup/2019-02-22/accounts/myuser.tar.gz
[2019-02-22 06:51:15 +0100]
[2019-02-22 06:51:15 +0100] size is: 2153721911
[2019-02-22 06:51:15 +0100]
[2019-02-22 06:51:15 +0100] homesize is: 1892986880
[2019-02-22 06:51:15 +0100]
[2019-02-22 06:51:15 +0100] homefiles is: 175633
[2019-02-22 06:51:15 +0100] pkgacct completed
[2019-02-22 06:51:15 +0100] info [backup] Successfully backed up account “myuser” to “/backup/2019-02-22/accounts”
[2019-02-22 06:51:15 +0100] info [backup] Adding metadata information for myuser to backup at /backup/2019-02-22
[2019-02-22 06:52:52 +0100] info [backup] Queuing daily backup copy of “myuser” for transport of “/backup/2019-02-22/accounts/myuser.tar.gz” to “2019-02-22/accounts/myuser.tar.gz”
[2019-02-22 06:52:52 +0100] info [backup] This particular transport will be queued with keep_local = 1 , based on the need to copy weekly () and/or monthly () copies as well.
[2019-02-22 06:52:57 +0100] info [backup] Queuing transport of file: /backup/2019-02-22/accounts/myuser.tar.gz
[2019-02-22 06:52:57 +0100] info [backup] no_transport = 0 .. and queueid = TQ:TaskQueue:81
[2019-02-22 06:52:57 +0100] info [backup] leaving queue_backup_transport_item
[2019-02-22 06:52:57 +0100] info [backup] Queuing transport of meta file: /backup/2019-02-22/accounts/.master.meta
[2019-02-22 06:52:57 +0100] info [backup] no_transport = 0 .. and queueid = TQ:TaskQueue:82
[2019-02-22 06:52:57 +0100] info [backup] leaving queue_backup_transport_item
[2019-02-22 06:52:57 +0100] info [backup] Queuing prune operation for remote destination daily backups
[2019-02-22 06:52:57 +0100] info [backup] no_transport = 0 .. and queueid = TQ:TaskQueue:83
[2019-02-22 06:52:57 +0100] info [backup] leaving queue_backup_transport_item
[2019-02-22 06:52:57 +0100] info [backup] Scheduling backup metadata vacuum
[2019-02-22 06:52:58 +0100] info [backup] Queuing transport reporter
[2019-02-22 06:52:58 +0100] info [backup] no_transport = 0 .. and queueid = TQ:TaskQueue:84
[2019-02-22 06:52:58 +0100] info [backup] leaving queue_backup_transport_item
[2019-02-22 06:52:58 +0100] info [backup] Completed at Fri Feb 22 06:52:58 2019
[2019-02-22 06:52:58 +0100] info [backup] Final state is Backup::Success (0)
[2019-02-22 06:52:58 +0100] info [backup] Sent Backup::Success notification.
or in the cPanel error logs at
Code:
/usr/local/cpanel/logs/error_log
In this file (are a 6 MB file size) I view about backup ftp this:
Code:
[2019-02-19 02:54:56 +0100] info [xml-api] Validation for transport “FTP House” failed: Could not upload test file: Permission denied. [backup_destination_validate] version [1].
Thank you very much!!
 

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
7,995
645
263
Houston
cPanel Access Level
DataCenter Provider
Hi @wonder_wonder

That's standard in this case then, it's never validated the backup transport so it won't try. Are you behind a NAT firewall? If so you may need to check the passive FTP box in WHM>>Backup>>Backup Configuration. Can you also confirm that port 21/20 are open on both the remote server as well as your own?
 
  • Like
Reactions: wonder_wonder

wonder_wonder

Well-Known Member
Jan 16, 2019
51
24
8
Spain
cPanel Access Level
Root Administrator
Hello @cPanelLauren !
Yes, I'm in NAT and I try check passive port FTP box in WHM>>Backup>>Backup Configuration and also I try with not check passive port.
Also, I try with disable NAT in my router and disable firewall in my router. Have the same result.
Also, I try with port 20 and 21 (are open in two servers) and have the same result.

For test, one friend, in her house, I try to connect to my house server (in my router) and can access without any problem (access, read, writte...).

For me its very strange...
 

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
7,995
645
263
Houston
cPanel Access Level
DataCenter Provider
Hello @cPanelLauren !
Yes, I confirm.
From my server, I can connect via FTP manually to the backup server.

Regards!
That is confusing indeed then, can you please open a ticket using the link in my signature? Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved.


Thanks!
 
  • Like
Reactions: wonder_wonder

wonder_wonder

Well-Known Member
Jan 16, 2019
51
24
8
Spain
cPanel Access Level
Root Administrator
That is confusing indeed then, can you please open a ticket using the link in my signature? Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved.


Thanks!
Yes, it is also confusing for me, I have been trying for several days, I can connect from my server to the backup server, a friend from home can also connect to my backup server, and all the tests are ok but the validation is not done. ... it is also strange for me.
Yes, of course, I will do that, I open a ticket and when I have the ID I post it here.
Thank you!
 
  • Like
Reactions: cPanelLauren

mramos

Active Member
Dec 10, 2002
25
0
151
Hi

I have the same problem.

When i choose the ftp backup not work.

I receive the following error

Error: Validation for transport “backupsweb.xxxxxx.com” failed: Could not list files in destination: Cpanel::Exception::InvalidParameter/(XID ay6x7v) “Cpanel::FileUtils::Permissions::String::str2oct” was given an invalid permissions string: 01-31-19


I can connect from filezilla with the same ftp credentials ok.
I can connect with ftp command from terminal on whm ok

but when I configure the ftp backup on additional destinations and validate not work

Thank you very much
 

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
7,995
645
263
Houston
cPanel Access Level
DataCenter Provider
Hello,


An update to this, the issue appears to have been an issue with permissions. The user in the initial post did not have permissions to write to the top level directory causing a permissions error when attempting to create new directories. This was also a non-standard FTP setup through a TP-Link Router - the ending suggestion in this instance was that it would be advisable to utilize a standard FTP server to store backups.


Thanks!
 
  • Like
Reactions: wonder_wonder

wonder_wonder

Well-Known Member
Jan 16, 2019
51
24
8
Spain
cPanel Access Level
Root Administrator
Hello @cPanelLauren !!
Yes, like you indicate, the issue is that you indicate.
My FTP server (made with TP-Link Router) can't made for have user permissions to writte in ./ root folder.
I am in contact with TP Link but indicate any solution for this.
I'm thinking in change the firmware from original firm to dd-wrt, I know that, this firmware is better (for ftp and other options) .
With the original firm tp-link isn't possible the user have permissions for writte in ./ or made that, the user point direct to the shared folder.
When changed the firmware to dd-wrt post the results.

Thanks and regards.
 
  • Like
Reactions: cPanelLauren

wonder_wonder

Well-Known Member
Jan 16, 2019
51
24
8
Spain
cPanel Access Level
Root Administrator
Hello @cPanelLauren !!

I too really happy :)

Yes, of course, I'm explained:

The default firmware of my router has this problem, even the FTP server is configured for full access always, root, does not allow writing.

After searching in recent days, I opted for the solution to install DD-WRT firmware on my router.

By default, FTP server of dd-wrt has the same function (using ProFTPD), it does not allow writing in the root, nor does it directly access the shared folder. Always, both with my original firmware and with DD-WRT when accessing via ftp is viewed:
/
/ Shared Folder
But in / (root folder) there are no write permissions nor are they modifiable.

But in DD-WRT we can modify it, edit it, add scripts ... etc ...

After searching for information and asking in dd-wrt forum, the solution is as follows:
After configuring our FTP server we proceed to modify the file proftp.conf with the following:

Code:
<Directory   "~/">
  <Limit WRITE>
    AllowAll
  </Limit>
</Directory>
In this way, root is also writable.

Then, it is necessary to generate some commands or scripts so that, if the router is restarted (either manually, by power cut or any other similar) when starting up, either rewrite this configuration, or the best option is to read the proftp.conf file of a usb pen for example.

If you think it appropriate, I can indicate here how I have proceeded with it, in case another user helps.

Thanks and regards!
 
  • Like
Reactions: cPanelLauren

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
7,995
645
263
Houston
cPanel Access Level
DataCenter Provider
If you think it appropriate, I can indicate here how I have proceeded with it, in case another user helps.
I think workarounds like this are definitely appropriate here! Just so long as you don't include any identifying information it's welcomed to have things like this here!

Thanks for adding the detailed instructions this far as well!
 
  • Like
Reactions: wonder_wonder

wonder_wonder

Well-Known Member
Jan 16, 2019
51
24
8
Spain
cPanel Access Level
Root Administrator
I think workarounds like this are definitely appropriate here! Just so long as you don't include any identifying information it's welcomed to have things like this here!

Thanks for adding the detailed instructions this far as well!
Hello @cPanelLauren !

Yes, I think the same, and not, don't include any identifying information :)

After made all changes I indicate in last reply,it is only necessary, add at the beginning, the following commands, in the beginning is in the administration of the router, dd-wrt has a tab called Administration, inside it another call Diagnostics, in it, we have an option to add scripts, commands ...etc...
It is a shell command window, we add these:
Code:
sleep 15
cp /mnt/sda1/proftpd.conf /tmp/proftpd/etc
sleep 5
killall -HUP proftpd
And click in Save Boot (So that at each start of the router execute these commands).

Note: The route: /mnt/sda1/proftpd.conf
It is where I have mounted my usb with the custom proftpd.conf, usually DD-WRT mounts the usb in sda1, but for example, my router has two USB ports, if we had two USB devices connected and mounted, we just have to notice that it is mounted.

The reason for the initial sleep 15 is so that, wait 15 seconds and then copy our custom file, in this way, we avoid the risk of first copying our custom file and at startup, then, copy the nvram file overwriting our personalized proftpd.conf.
The next sleep 5 I have added it just as a precaution, so that, if delay in accessing to our mounted USB, have enough time to make the copy, wait, and then restart the FTP server, this time, with our custom configuration.

Thanks and regards!!
 
  • Like
Reactions: cPanelLauren