permissions (?) error after failed apiscp auto-update of WordPress plugins

Description

WordPress site had critical error after ApisCP updated plugins last night. I have been trying to manually install or update the offending plugins with no success. I’ve gotten the site working without these few plugins, but nothing I’ve tried will let me re-install those plugins.

Steps leading to the error

  • ApisCP auto-update.
  • Critical error on WordPress site.
  • Entered recovery mode, disabled three plugins. Site started working otherwise.
  • Enabling other plugins caused a failure: “The plugin does not have a valid header.”
  • Deleting the plugin directory and re-installing failed with error: “The destination directory already exists and could not be removed.”

I turned on WordPress debug mode and got some errors in the debug log including “no such file or directory” on a plugin file that exists and appears to have proper permissions. But it seems like apache is seeing something different than I am seeing in terms of permissions. I’m not sure what is going wrong. I’ve released fortification, and I’ve confirmed with getfacl that apache has rwx permission on those files. What might I be overlooking?

now I’m getting a “stale file handle” when trying to work with one of the plugin directories.

To try to fix whatever was going on with stale file handles, I moved the entire plugins directory out of the way and restored from a backup. Now all my plugins fail with the same error: " The plugin akismet/akismet.php has been deactivated due to an error: The plugin does not have a valid header.”

I guess that was a bad idea.

I think I’m making progress. Restarting php-fpm seemed to get me back into my plugins directory. Now let me see if I can get them working!

Enable Update Assurance within the control panel. This will snapshot your WordPress site, perform updates, then verify HTTP response code + response size following an update. If a non-2xx response is generated or the response size deviates too much (± 5%), it’ll revert to the previous snapshot.

Whatever the cause here, looks to be a plugin incompatibility post-update. You can also set plugins to skip automatic updates under Web Apps > WordPress Features > Package Management.

Thanks, I’ll definitely enable Update Assurance for next time. The plugins with errors installed successfully through automatic updates on other sites, and they ultimately worked fine on this site once I was able to manually update them, so I have no idea what the issue might have been.