WordPress.org

Ready to get started?Download WordPress

Forums

BackWPup Free - WordPress Backup Plugin
[resolved] Help! 403 Forbidden after backup! Can't recover! (24 posts)

  1. farrelldoc
    Member
    Posted 3 years ago #

    I get a 403 Forbidden error on every page of the site, public and admin after installing and backing up! I tried removing every BackWPup file via FTP, but that didn't work. (I made a backup first.) What do I do?

    Forbidden

    You don't have permission to access /wp-admin/index.php on this server.

    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

    http://www.bonneytexas.gov

  2. s_ha_dum
    Member
    Posted 3 years ago #

    Check the owner, group, and permissions of your files and folders on the server. You might be able to change them via FTP. You might have to do it through something like cpanel. Or you might have to get from from your host. It depends on how the server is configured.

  3. farrelldoc
    Member
    Posted 3 years ago #

    Which files/folders should I check? What should the permissions be?

    Thanks

  4. farrelldoc
    Member
    Posted 3 years ago #

    I did put it in maintenance mode during the backup (or told backwpup to). I haven't done that on any other sites--that was the only thing I did differently.

    The verbose output said that it put it back in production mode when the backup finished. However, no backup was created when I navigated to where it was supposed to be via FTP.

    Thanks for your help.

  5. farrelldoc
    Member
    Posted 3 years ago #

    The index.php file is 644 and so is wp-content. wp-admin is 755.

  6. Daniel Hüsken
    Member
    Plugin Author

    Posted 3 years ago #

    try to find and delete .maintenance file in blog root.

  7. farrelldoc
    Member
    Posted 3 years ago #

    Thank you for your responses.

    I looked, but it is not there. I think it did come out of maintenance mode, but something else happened at the same time.

    I have considered making a copy of my images and whatever else I can (not that much that I can) via FTP and then uninstalling WP from cPanel (Fantastico). If I did this and it's a permission problem, do you think that it would work, or would the file system "remember" the bad permissions? (I've experienced this before if I remember correctly.)

    I'd rather not have to go through this and re-set up all my theme settings again. It's a complex theme, and I didn't get a chance to export the settings before the site blew up--I was, after all, trying to make a back up when it happened... :)

    Thanks for all of y'alls help! I really appreciate it! I hope I can get this fixed without starting over from scratch, but if I do, I want that to work!

  8. s_ha_dum
    Member
    Posted 3 years ago #

    No. The filesystem shouldn't remember the bad permissions if you reinstall, though there might be something about Fantastico or cpanel that does. I'm not sure about that. To save your settings, you should be able to export your database via cpanel. I believe cpanel incorporates PhpMyAdmin for this, but I'm not sure. Just export the whole database and import it when you reinstall, if you have to. Hopefully, you won't have to. You don't seem to be having database problems so you may not have to reinstall it. (But export it as a backup anyway.)

    Back to fixing things... Have you looked in .htaccess? There might be rules in there that are denying access to these files.

    If that is not it and I had to guess, your file owner or group has been changed. I'm not sure why. The permissions themselves look reasonable but those permissions are relative to who owns the files and which group the files belong to. For example, 755. The file owner has permission '7', meaning read, write, and execute. Anyone in the file's group has permission '5', meaning read and execute. Everyone also has permission '5'. So if your owner or group gets changed, you also lose the permissions. I've seen similar issues where server configuration requires files to be owned by your user account but the web server is running under another user account. If WordPress uploads something those files are then owned by the server's user... its frustrating. I hope that isn't it.

  9. farrelldoc
    Member
    Posted 3 years ago #

    Thank you so very much for your detailed response. I tried changing my public_html permissions (just the folder) and the index.php file to 755, and that didn't do it. wp_content is already 755. I'm not sure what else to try to change. There are so many files; I can't do them one by one. Do you have any idea which one I should look for to try to change? I can't even view the public site.

    If I uninstall and reinstall, should I reinstall the whole database, or just part of it? I don't want to end up with the same problem all over again. Which method should I use (insert, etc.)? Messing with phpMyAdmin always scares me! :)

    Sorry for all the questions, but I'm so glad you answered and you are so knowledgeable! Thanks so much--I'm at wits end. I can't believe trying to do a backup brought down the site!

    Thanks,
    Karen

  10. s_ha_dum
    Member
    Posted 3 years ago #

    Thank you so very much for your detailed response.

    You're welcome. Please remember that I'm guessing though. :)

    Did you look in your .htaccess file? If not, do that now. Look for words like 'Allow' and 'Deny'. If you find anything like that post it here. You can post up to 10 lines of code in the forum without violating the rules. Be sure to use the 'code' button above, next to 'b-quote'.

  11. farrelldoc
    Member
    Posted 3 years ago #

    Sorry, I forgot to respond to that question...

    Yes, that is the first thing that I checked. There is nothing there but what I put in it right at first when it was still working (the rewrite rules for URLs):

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    Thanks!

  12. farrelldoc
    Member
    Posted 3 years ago #

    I just went in and compared a lot of the file permissions with the perms of a WP site (same version) that is working, and they are the same for the files that I checked. Of course, I didn't check every file.

    Could it be something in the DB that was changed? What would I look for or change there. I'm not that familiar with MySQL, though I have played with it a little, so I can follow instructions--maybe. :)

    Thanks again!

  13. farrelldoc
    Member
    Posted 3 years ago #

    I ran a check in cPanel:

    Checking Database
    bonney_wrdp1 is now being checked.
    bonney_wrdp1.wp_commentmeta OK bonney_wrdp1.wp_comments OK bonney_wrdp1.wp_links OK bonney_wrdp1.wp_options OK bonney_wrdp1.wp_postmeta OK bonney_wrdp1.wp_posts OK bonney_wrdp1.wp_term_relationships OK bonney_wrdp1.wp_term_taxonomy OK bonney_wrdp1.wp_terms OK bonney_wrdp1.wp_usermeta OK bonney_wrdp1.wp_users OK
    Check Complete
  14. farrelldoc
    Member
    Posted 3 years ago #

    I looked at the log file for backwpup, and it looked like everything ran fine. The last thing it did was run backwpup_dojob.php. Maybe something that this file does is incompatible with WP 3.1.3. This is the only thing that I can figure out. The DB looks fine in phpMyAdmin.

    Both of these files are much more than 10 lines long, so I can't post them here.

  15. s_ha_dum
    Member
    Posted 3 years ago #

    Have you been able to find out what the owner and group settings are on your files? If not, you are probably going to have to look at reinstalling. Sorting things out by manipulating owners and groups could be a pretty big hassle anyway.

    You can post that dojob.php file to the pastebin. Follow the link to the forums rules I provided earlier. I'll look at the file. I don't know if it will tell me enough though.

    I don't have any ideas other than trying to reinstall. This is the process as completely as I can get it:

    1. Export your entire database using PhpMyAdmin. Make sure you save it to a file on your computer.
    2. Save your wp-config.php file. At the very least you will want it as a reference for your DB connection information.
    3. Save your entire wp-contents folder using FTP. you will need part of this later.
    4. Remove WordPress. You should probably use the same script to remove it as you used to install it. I've heard rumors that some of these scripts leave behind cruft that interferes with re-installation. I hope that isn't true in your case. I have never once used any of those scripts so I don't have experience with them. I like FTP. I'm old school that way. :)
    5. Put WordPress back. If it were me, I'd FTP the files to the server. If you run the Fantastico script you may end up recreating or overwriting your database. We hope to avoid that.
    6. Rename the wp-config-sample.php file to wp-config.php and edit it to match the one you saved earlier.
    7. Copy over the uploads folder from the wp-contents that you saved earlier to the new wp-contents folder on the server.
    8. Upload your theme and plugins to the correct folders on the server. I'd use fresh copies for this, not the saved ones.
    9. Hopefully, things will work.

    Now, I've tried to be thorough, but you may want to wait for further comment from someone else. I have no experience with those scripts and I may have forgotten something. It happens. On the upside, if you've exported your database correctly there is little chance of losing your posts or settings.

  16. farrelldoc
    Member
    Posted 3 years ago #

    Wow! Thanks so much! I will try this now. I've never installed WP that way--I've always used Fantastico, but I'll give it a shot. I assume that I'm supposed to leave the DB where it is but make a backup of it? Do I use Replace, Update or Insert when I save it? I would assume Replace.

    Thanks again!

  17. farrelldoc
    Member
    Posted 3 years ago #

    Very, very bad news...

    I removed everything and reinstalled, and I still can't access the site. I'm going to contact my webhost.

    Thanks,
    Karen

  18. s_ha_dum
    Member
    Posted 3 years ago #

    I am very sorry to hear that. I hope your host can help.

  19. farrelldoc
    Member
    Posted 3 years ago #

    Thank you for everything. They did help, and the site is back where it was before it blew up.

    http://www.bonneytexas.gov

    It was a rouge .htaccess file in my home directory (above public_html). They renamed it. I didn't even look there. I have no idea how that happened just by making a backup, but you can be sure that I won't try that again with this plugin on 3.1.3! :)

    I had already removed everything and reinstalled a fresh copy of WP, so I put everything back per your instructions, and it's all good now. Thanks!

    Rouge .htaccess file contents...

    Order allow,deny
    deny from all

    ... just like you suspected, but in a different place.

    I'm going to spend today making progress getting some of the rest of the content and up and trying to finish the site. I was about to install a couple of new plugins when I tried to make a backup first--just in case a plugin caused a problem... lol :)

    Have a great Memorial Day if you are in the US--and a great week if you aren't! Thanks again for all the help--I learned a lot and got a lot of comfort from you being with me through that ordeal!

  20. s_ha_dum
    Member
    Posted 3 years ago #

    I'm glad you got that worked out.

  21. Daniel Hüsken
    Member
    Plugin Author

    Posted 3 years ago #

    did you set the folder where the backups placed zhe same as your home derectory ?

    th plugin will create a .htaccess in the backups folder if no one exitst for security.

  22. s_ha_dum
    Member
    Posted 3 years ago #

    did you set the folder where the backups placed zhe same as your home derectory ?

    th plugin will create a .htaccess in the backups folder if no one exitst for security.

    You may have just found the cause of the problem. Hopefully farrelldoc will return to comment further.

  23. farrelldoc
    Member
    Posted 3 years ago #

    Yep. There it is. I would have sworn that the backup dir was set to the default in wp-content, but there is the backup file in my home dir, pretty as you please.

    This is very good information! Maybe there should be a warning not to make your backups to your home directory. I'm not sure why I did that and don't even remember doing it.

    Thanks for the tip!!! I hope all this helps someone else.

    Thanks Guys,
    Karen

  24. farrelldoc
    Member
    Posted 3 years ago #

    Oh, and by the way, now that I know what caused the problem, I definitely will use this plugin again. I love this plugin and have it on all of my WP sites. I'm glad to know that I can continue using it! (But just to be on the safe side, I think I'll make a manual backup first before I try it again on this 3.1.3 site...)

    ;)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags