Auto update for Drupal installation failed with permission errors.
/var/log/plesk/panel.log the following errors can be found:
[2015-03-21 02:25:12] ERR [panel] Script execution failed: PHP Warning: rename(/var/www/vhosts/domain.tld/httpdocs//sites/default/settings.php,/var/www/vhosts/domain.tld/httpdocs//sites/default/settings.php1426904706): Permission denied in /usr/local/psa/var/apspackages/apscatalog8uLksl.zip326cba67-e169-42/cache/scripts/app-util.php on line 61 PHP Warning: include(/var/www/vhosts/domain.tld/httpdocs//update.php): failed to open stream: No such file or directory in /usr/local/psa/var/apspackages/apscatalog8uLksl.zip326cba67-e169-42/cache/scripts/upgrade-app.php on line 83 PHP Warning: include(): Failed opening '/var/www/vhosts/domain.tld/httpdocs//update.php' for inclusion (include_path='.') in /usr/local/psa/var/apspackages/apscatalog8uLksl.zip326cba67-e169-42/cache/scripts/upgrade-app.php on line 83 PHP Notice: Undefined variable: _SESSION in /usr/local/psa/var/apspackages/apscatalog8uLksl.zip326cba67-e169-42/cache/scripts/upgrade-app.php on line 98
Cause of the issue is invalid permissions to the
sites/default directory. The user performing package upgrade has no write permissions to this directory. As a result, the call "sappmng --extract-application ..." fails with the following error:
Filesystem error: boost::filesystem::remove: Permission denied: "/var/www/vhosts/domain.tld/httpdocs/sites/default/default.settings.php"
and with exit code 1.
Mentioned above permissions (555) are set by Drupal. Though at the moment of installation (for the old version) Plesk sets permissions 755, but if you open Drupal->Reports->Status report, then Drupal becomes aware of it and reverts permissions to the state it considers correct.
This behavior is considered as software issue with ID APSI-1 it will be fixed in one of the next Plesk updates.
- Restore domain from a backup
Change permissions as shown on example:
[root@ ~]# chmod 755 /var/www/vhosts/subscription.tld/httpdocs/sites/default [root@ ~]# chmod 755 /var/www/vhosts/subscription.tld/httpdocs/sites/default/*
- Upgrade Drupal again.
If you do not have a backup please contact Odin Technical Support.