WordPress.org

Support

Support » Plugins and Hacks » BackWPup - WordPress Backup Plugin » [Resolved] Help! 403 Forbidden after backup! Can't recover!

[Resolved] Help! 403 Forbidden after backup! Can't recover!

  • 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

Viewing 15 replies - 1 through 15 (of 23 total)
  • 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.

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

    Thanks

    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.

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

    Plugin Author Daniel Hüsken

    @danielhuesken

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

    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!

    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.

    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

    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’.

    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!

    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!

    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

    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.

    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.

    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!

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘[Resolved] Help! 403 Forbidden after backup! Can't recover!’ is closed to new replies.
Skip to toolbar