-
AuthorPosts
-
December 17, 2020 at 5:46 pm #32331Roberta (Robin) SullivanGuest
When I Try To Restore A Total Upkeep Backup, I Receive The Error: “Permission Denied. Unable To Restore The Following File: /Opt/App-Root/Src” Can Someone Help Me Get Past This?
December 17, 2020 at 5:56 pm #32343Jesse OwensKeymasterHi Robin-
This error is related to the file permissions on your server. One possible explanation I can think of is that your System Administrator disabled write permissions on the root of your website, and only allows your user to write to the wp-content directory rather than the core WordPress files.
One thing that might help us to see is your restoration log. Navigate to Total Upkeep > Tools > Logs and locate the log file called
restore-XXXXXXX.log
with a timestamp that corresponds to the failed restoration, and copy and paste any errors in that log here so we can dig deeper for you.December 17, 2020 at 6:20 pm #32348Roberta (Robin) SullivanGuestIt is very likely the permissions on the root directory. Is it possible to just restore the sunny theme and the search-ajax plugin within their respective folders?
Here’s a copy of the log:
[2020-12-17 20:02:59 UTC] Last error: Array
(
[type] => 8
[message] => Constant DISALLOW_FILE_EDIT already defined
[file] => /opt/app-root/src/wp-config.php
[line] => 46
)[2020-12-17 20:02:59 UTC] PHP Version: 7.0.27
[2020-12-17 20:02:59 UTC] WordPress Version: 5.5.3
[2020-12-17 20:02:59 UTC] Total Upkeep version: 1.14.10
[2020-12-17 20:02:59 UTC] Restoration process initialized.
[2020-12-17 20:02:59 UTC] Memory usage – limit / current / peak memory usage: 128M / 9591792 (9.15 MB) / 9630768 (9 MB)
[2020-12-17 20:02:59 UTC] Restore info: Array
(
[mode] => restore
[dryrun] =>
[filename] => boldgrid-backup-emtechwiki.webapps.buffalo.edu-872a2acb-20201210-204957.zip
[filepath] => /opt/app-root/src/boldgrid_backup/boldgrid-backup-emtechwiki.webapps.buffalo.edu-872a2acb-20201210-204957.zip
[filesize] => 1068973564
[archive_key] => 2
[restore_ok] => 1
)[2020-12-17 20:02:59 UTC] Last error: Array
(
[type] => 2
[message] => chmod(): Operation not permitted
[file] => /opt/app-root/src/wp-admin/includes/class-wp-filesystem-direct.php
[line] => 173
)[2020-12-17 20:02:59 UTC] Permission denied. Unable to restore the following file: /opt/app-root/src/./
December 17, 2020 at 6:25 pm #32350Jesse OwensKeymasterHi Robin-
Yes, this log does look like it confirms that file permissions issue. You can use your backup archive to only restore those two directories, but it will take a little more work. Here’s how I’d do it:
1. Download the backup archive to your local computer
2. Unzip the archive and locate the directories for/wp-content/themes/sunny
and/wp-content/plugins/search-ajax
(I’m guessing the name of the theme and plugin folders, but you should recognize them)
3. Use FTP or your host’s file manager tool to replace those directories on your website.I’ve also created a feature request for our developers to review to restore specific directories, I think your example shows that would be a really useful feature for a lot of folks.
December 21, 2020 at 4:26 pm #32411Roberta (Robin) SullivanGuestHi again,
I have been able to restore the theme and plugin directories. I was able to get back to the WP dashboard and installed the FileManager plugin and successfully copied the files over.
I would like to correct the server permissions to allow BoldGrid to work. Can you tell me what the proper command line is to do this? My WP runs using POD Containers so I should have the ability to modify this.
Robin
December 21, 2020 at 4:27 pm #32412Roberta (Robin) SullivanGuestIf you might also be able to tell me what other files or folders I should restore from the dev to the live server using FileMananger, that would also be a big help.
It seems that somewhere the suny theme is not being recognized and the twentytwentyone theme is still driving the site even though I have deleted the twentytwentyone theme.
The first time I hit Activate on the plugin that was deleted, I got the error below.
Line 17 in search-ajax.php reads:
require_once (get_template_directory() . ‘/inflector.class.php’);ERROR:
Plugin could not be activated because it triggered a fatal error.Warning: require_ once(/opt/app-root/src/wp-content/themes/twentytwentyone/inflector.class.php): failed to open stream: No such file or directory in /opt/app-root/src/wp-content/plugins/search-ajax/search-ajax.php on line 17
Fatal error: require_once(): Failed opening required ‘/ oot/app-root/src/wp-content/themes/twentytwentyone/inflector.class.php’ (include path=‘.:/opt/app-root/src:/opt/rh/rh-php70/root/usr/share/pear’)
December 21, 2020 at 4:50 pm #32467Jesse OwensKeymasterHi Robin-
I’m not super familiar with POD Containers, so I’m hesitant to provide you with a command to modify the permissions for fear I’d make things worse by giving you the wrong advice. Your System Admin might be a better resource for that.
My guess would be that the containers are provisioned with a different owner for the main document root directory. My other guess would be that if your System Admin set it up this way, they’re probably doing it on purpose so they can manage your Core WordPress files for security purposes.
That being said, a better way to set this up might be to only back up your wp-content directory and your database, so you can use the built-in restoration tool. Navigate to Total Upkeep > Settings > Backup Storage and select the option for a Custom Backup. Remove the word WPCORE from the Include files, and add it to the Exclude field:
Then, you’ll only back up the things you have permission to modify, so if you need to restore again in the future you’ll be able to do so easily.
Now, about that error you’re getting. I’m guessing that the Search Ajax plugin was custom-designed for your Suny theme, since it requires a theme file that’s not present in other themes. There’s three ways you can fix this.
1. The root cause of the issue is that you restored the files, but not the database. You can find the database backup in your archive (look for the file ending in .sql) and restore it using phpMyAdmin or your host’s database administration tool.
2. Probably easier than restoring the database manually, you can switch the theme to Suny using phpMyAdmin or using WP-CLI.
3. Temporarily disable the Search Ajax plugin. I’m listing this one last because while it’s the easiest way to get back into your site, there may be other custom plugins on your site that might also depend on the theme. You can disable the plugin with FTP or File Manager or using WP-CLI.
I hope this helps! Please let us know if you’re still having any trouble, we’ll be happy to help further.
-
AuthorPosts
- The topic ‘Permission Denied. Unable To Restore’ is closed to new replies.