Applicable to:
- Plesk for Linux
Symptoms
Plesk update or upgrade failed:
PLESK_ERROR: chown: changing ownership of `/var/lib/psa/dumps/mysql.preupgrade.11.5.30-11.5.30.20131211-190722.dump.gz': Operation not permitted
or:
PLESK_ERROR: ... touch: setting times of '/mnt/opendrive/webserver/Backup/mysql.preupgrade.17.5.3-17.5.3.20170921-194900.dump.gz': No such file or directory
ERROR while trying to backup MySQL database
Check the error reason(see log file: /var/log/plesk/install/plesk_17.5.3_installation.log), fix and try again ERROR: An error occurred during performing of installation PREP actions (see log for details). Installation was rolled back.
Warning! Not all packages were installed.
Please check if your system services are operable.
Please resolve this issue and try to install the packages again.
If you cannot resolve the issue on your own, contact product technical support for assistance.
or:
PLESK_ERROR: EMERGENCY: Unable to write in the /backup_custom directory. The upgrade procedure will fail. Check that the folder exists and you have write permissions for it, and repeat upgrading.
Backup location was customized:
# grep -i dump /etc/psa/psa.conf
DUMP_D /backup_custom
DUMP_TMP_D /backup_custom/tmp
It's not possible to create a new file on this location:
# touch /backup_custom/test.txt
touch: setting times of ‘/backup_custom/test.txt’: No such file or directory
Cannot change the backup directory permissions because it is mounted in read-only mode:
# chmod 750 /backup_custom
chmod: changing permissions of /backup_custom: Read-only file system
# mount | grep backup
/dev/sdc1 on /backup_custom type ext4 (ro,relatime,discard,data=ordered,_netdev)
Cause
During the upgrade process Plesk creates databases (psa, horde) dumps. Prior to dumping database, it corrects permissions for files in the backup directory. If backup directory is located on NFS share or external drive, Plesk fails to change permissions there and create a backup.
Resolution
-
Login to the server over SSH
-
Back up
/etc/psa/psa.conf
configuration file# cp /etc/psa/psa.conf{,.orig}
-
Change the backup location directory to a default one:
# grep -n DUMP /etc/psa/psa.conf
DUMP_D /var/lib/psa/dumps
DUMP_TMP_D /tmp - Make sure both directories have the same permissions as:
# ls -ld /var/lib/psa/dumps
drwxr-x--- 6 psaadm psaadm 20480 Sep 22 02:46 /var/lib/psa/dumps
# ls -ld /tmp
drwxrwxrwt 29 root root 20480 Sep 22 03:01 /tmp -
Complete the update or upgrade in Plesk > Tools&Settings > Updates & Upgrades
-
When upgrade process is finished, revert the changes made in
/etc/psa/psa.conf
Workaround for remote NFS share used as a backup location:
1. Login to the server over SSH
2. Open /etc/exports
and set 'no_root_squash' option to the share configuration string. For example:
CONFIG_TEXT: /srv/nfs 203.0.113.2/32(rw,sync,sec=sys,no_root_squash)
3. Apply the configuration settings:
# exportfs -avr
Comments
2 comments
this is a manual solution, but we need an automated solution.
is not possible to change with an sript before plesk update and after plesk update to change this file?
@Luis Zubeldia
Hello!
I suggest providing your idea on User Voice: https://plesk.uservoice.com/forums/184549-feature-suggestions
The top-ranked suggestions are likely to be included in the next versions of Plesk.
Please sign in to leave a comment.