• Resolved Vyacheslav

    (@badarmor)


    Hi!
    Setting “FTP mode” doesn’t save after updating and checking connection. Don’t now why but active mode doesn’t work for me. Plugins says ‘Could not retrieve FTP directory listing’. I’m trying select passive mode. Plugin says that setting is saved , no warnings. But after that i’m trying change it again and there is active mode is selected. And ftp backup failed after that.
    Can’t select and save passive or auto mode.

Viewing 15 replies - 1 through 15 (of 34 total)
  • Thread Starter Vyacheslav

    (@badarmor)

    I found the way to save the ftp mode option. Together with the ftp mode option I changed another option which is the number backups to retain. After that the ftp mode option was saved but number of backups wasn’t. So i think you have issue with saving only one option or last option. Still may be I’m doing something wrong here. Please correct me.

    P.S. plugin is really good ?? thank you.

    Plugin Author Brad Markle

    (@bwmarkle)

    Hi @badarmor, thanks for taking a moment to let us know about the bug you found saving your ftp settings. I wasn’t able to replicate it exactly, but I think I did find a bug in those settings. We’ll look into it and get back to you shortly. Also, I made a quick video to say hi and thanks! https://youtu.be/68iTtF1wJoo

    Thread Starter Vyacheslav

    (@badarmor)

    Hi Brad. Thank you for the prompt reply.

    Plugin Author Brad Markle

    (@bwmarkle)

    Hi @badarmor, I’m trying to replicate the same exact error that you’re having, but I’m having trouble doing so.

    Is this your first time configuring his ftp account with Total Upkeep, or was it working before?

    Are you able to use an ftp client to very the ftp connection is working, IE like filezilla?

    Thanks,
    – Brad

    Thread Starter Vyacheslav

    (@badarmor)

    Hi Brad. I wrote earlier that I was able to save this option by changing two options at the same time. After plugin saved the ftp mode option as passive backup was done just fine.

    And answering you questions if it still matters

    No I configured that not for the first time. I tried to change only one option. Backup didn’t work through ftp. That was the reason why I tried to select another one option. But yes ftp connection is checked by me and it works. And I did sent files from this exact server to this ftp account using console.

    Thank you.

    • This reply was modified 4 years, 11 months ago by Vyacheslav.
    Thread Starter Vyacheslav

    (@badarmor)

    Just fix this minor issue with saving separate options because not expereinced user may not to guess how make it changed.
    As I said it is not about only ftp mode. At least the option ‘Retention (Number of backup archives to retain)’ have the same issue.
    Just think of this scenario. User think he saved the option ‘Retention (Number of backup archives to retain)’ to 2 for example (after counting free space on a hard drive) but still there 5 remains for instance and user could run out of disk space after or during backup. In consequences some files or even database may be corrupted. I think it would be great if those critical options were displayed in user intarface somewhere after popup window was closed, in dashboard as an option.

    Regards,
    Vyacheslav

    • This reply was modified 4 years, 11 months ago by Vyacheslav.
    Thread Starter Vyacheslav

    (@badarmor)

    Accept my apologies if I underestimate your plugin. May be you have protection for disk space overflow. Just want to help to avoid some problems.

    Today I tried to understand why the active mode doesn’t work for me. And my final thought is it because in my server I have strict firewall rules and all unused and unknown ports are closed for connection.

    Regards,
    Vyacheslav

    Plugin Author Brad Markle

    (@bwmarkle)

    Hi @badarmor,

    Thanks for getting back to us. I appreciate you looking into this issue further!

    Yesterday, in my testing, I set the FTP mode to auto, and then it changed to active. I mentioned that this looked to be a bug. After reviewing the code, because I set it to “auto” and “active” worked, it automatically changed the setting from “auto” to “active”.

    In your case, “active” is not working. What is strange to me is that if the ftp connection is not successful, no settings should be saved. So, if you change the retention to 11, but the ftp connection could not be made, then that retention setting won’t actually be saved to 11.

    In order to troubleshoot this issue further, it would be helpful to be able to replicate the issue. We setup a test server, but one of our system admins was not able to setup the server to make an active ftp connection fail.

    And my final thought is it because in my server I have strict firewall rules and all unused and unknown ports are closed for connection.

    Did you run a command to do this, or was this a manual process of closing all these ports?

    Thanks!
    – Brad

    Thread Starter Vyacheslav

    (@badarmor)

    Hi Brad.

    Try this rules

    # ftp
    $IPTABLES -A INPUT -p tcp –dport 21 -j ACCEPT
    $IPTABLES -A INPUT -p tcp –dport 49152:65534 -j ACCEPT # passive mode ports ftp
    $IPTABLES -A INPUT -p tcp –dport 20 -j ACCEPT # active mode port ftp

    I can send you full bash script which I used to generate rules om my server. I just don’t want to post it here publically. Give me please email address where I can send it.

    Plugin Author Brad Markle

    (@bwmarkle)

    Hi @badarmor,

    I was able to replicate 2 of the 3 steps that you mentioned. I can get “active” mode to fail, and “passive” mode to succeed, but I don’t see it reverting back and failing.

    I took screenshots of what I did and what I was able to replicate: https://docs.google.com/document/d/1CXJSCbdqNCOsxVDs20e23v7Hou0-24HO_pI-r_vnUMc/edit#

    Am I following the same steps as you are?

    Thanks,
    – Brad

    Thread Starter Vyacheslav

    (@badarmor)

    Hi Brad,

    Yes, exactly. I’ve already saved the passive mode.
    So don’t know how to replicate this.
    But as I mentioned earlier the same issue with retention take place.

    So I recorded the video with saving retention https://drive.google.com/open?id=1I5dgLZSZVrvmrSNGC7x860315O6dSJuB
    Sorry for terrible masks ??

    Attempt to save retention to 2 was failed.

    I saw no errors in console by the way.

    Later I will try to replicate the ftp mode issue on another wordpress installation.

    Regards,
    Vyacheslav

    • This reply was modified 4 years, 11 months ago by Vyacheslav.
    • This reply was modified 4 years, 11 months ago by Vyacheslav.
    Thread Starter Vyacheslav

    (@badarmor)

    I saw no errors in console by the way.

    I mean in the browser console.

    Plugin Author Brad Markle

    (@bwmarkle)

    Hi Vyacheslav, thanks for sending the video.

    This file isn’t playable. That might be because the file type is unsupported, the file extension is incorrect, or the file is corrupt.

    I downloaded the video, it was 16.5MB, but I was unable to play the video.

    Later I will try to replicate the ftp mode issue on another wordpress installation.

    It’s against forum rules to ask for credentials to your site… But if you have a test WordPress installation where you’ve replicated the issue, if you could reach out to me via WordPress Slack, I’d be happy to review further.

    Thanks,
    – Brad

    Thread Starter Vyacheslav

    (@badarmor)

    Hi Brad, I shared the video from my google drive once again.

    By the way I dug deeper into your plugin.

    What I descovered is next

    In the file class-boldgrid-backup-admin-ftp-page.php I inserted some code with logging into two different files

    First code right after $post_data = $this->core->ftp->get_from_post(); (114 line)
    I logged serialize($post_data) into file1.log

    Second code right before update_site_option( ‘boldgrid_backup_settings’, $settings ); (231 line)
    I logged serialize($settings) into file2.log

    So I had retention set to 3. I tried to change it to 2
    To be honest sometimes it is working correctly. I think 1 out of 5 times.
    But at that time attempt was failed again.

    The content of the file1.log was at 2020-04-30 00:05:24 UTC+3

    a:9:{s:4:”host”;s:26:””;s:4:”user”;s:7:””;s:4:”pass”;s:16:””;s:11:”folder_name”;s:33:””;s:4:”type”;s:3:”ftp”;s:8:”ftp_mode”;s:7:”passive”;s:4:”port”;i:21;s:15:”retention_count“;i:3;s:8:”nickname”;s:9:”local_ftp”;}

    The content of the file2.log was at 2020-04-30 00:05:08 UTC+3

    a:21:{s:8:”schedule”;a:10:{s:10:”dow_sunday”;i:1;s:10:”dow_monday”;i:1;s:11:”dow_tuesday”;i:1;s:13:”dow_wednesday”;i:1;s:12:”dow_thursday”;i:1;s:10:”dow_friday”;i:1;s:12:”dow_saturday”;i:1;s:5:”tod_h”;i:6;s:5:”tod_m”;s:2:”40″;s:5:”tod_a”;s:2:”PM”;}s:15:”retention_count”;i:3;s:18:”notification_email”;s:23:””;s:13:”notifications”;a:3:{s:6:”backup”;i:1;s:7:”restore”;i:1;s:10:”site_check”;b:1;}s:11:”auto_backup”;i:0;s:13:”auto_rollback”;i:0;s:6:”remote”;a:2:{s:5:”local”;a:1:{s:7:”enabled”;b:1;}s:3:”ftp”;a:11:{s:4:”host”;s:26:”;s:4:”user”;s:7:””;s:4:”pass”;s:16:””;s:4:”port”;i:21;s:4:”type”;s:3:”ftp”;s:8:”ftp_mode”;s:7:”passive”;s:15:”retention_count“;i:2;s:8:”nickname”;s:9:”local_ftp”;s:11:”folder_name”;s:33:””;s:10:”last_login”;s:10:”1588194298″;s:7:”enabled”;b:1;}}s:14:”exclude_tables”;a:0:{}s:24:”folder_exclusion_include”;s:18:”WPCORE,/wp-content”;s:24:”folder_exclusion_exclude”;s:35:”.git,node_modules,/wp-content/cache”;s:10:”site_check”;a:4:{s:7:”enabled”;b:1;s:6:”logger”;b:1;s:13:”auto_recovery”;b:0;s:8:”interval”;i:15;}s:10:”encrypt_db”;b:0;s:16:”backup_directory”;s:44:””;s:10:”compressor”;s:10:”system_zip”;s:9:”scheduler”;s:4:”cron”;s:11:”crons_added”;b:1;s:15:”crontab_version”;s:5:”1.6.4″;s:11:”cron_secret”;s:64:””;s:19:”exclude_tables_type”;s:4:”full”;s:21:”folder_exclusion_type”;s:6:”custom”;s:7:”updated”;i:1587289542;}

    So the retention_count for ftp was different.
    As I understand plugin saves settings and after that render it again for user.
    Hope it will help somehow.
    I can do more logging and debugging if you need.

    P.S. Sorry I had to delete all critical data from files such as passwords and so on.

    • This reply was modified 4 years, 10 months ago by Vyacheslav.
    Thread Starter Vyacheslav

    (@badarmor)

    Hi.

    Just want to add to last post I made.
    It seems that wordpress core function update_site_option() fails in this case. And nothing updates in database actually. Or may be cache issue. I have single site installation. Later I’ll try to use update_option().

    Regards,
    Vyacheslav

Viewing 15 replies - 1 through 15 (of 34 total)
  • The topic ‘FTP setting can’t be saved’ is closed to new replies.