Plesk upgrade failed with error: cpio: rename failed - Operation not permitted.

Refers to:

  • Plesk for Linux

Created:

2016-11-16 12:50:50 UTC

Modified:

2017-02-27 13:48:26 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Plesk upgrade failed with error: cpio: rename failed - Operation not permitted.

Symptoms

Plesk upgrade failed, in panel you could find following error:

ERROR: Exception

Up Level
Permission denied

Following error could be found in log /tmp/autoinstaller3.log :

Error unpacking rpm package 2:shadow-utils-4.0.17-21.el5.x86_64
Exception: Scriptlet or other non-fatal errors occurred during transaction.
Installing: 2:shadow-utils-4.0.17-21.el5.x86_64 [1/2]
warning: /etc/login.defs created as /etc/login.defs.rpmnew
error: unpacking of archive failed on file /usr/bin/chage: cpio: rename failed - Operation not permitted
Installing: plesk-core-12.0.18-cos5.build1200140606.16.x86_64 [2/2]

Cause

  1. Immutable flag was enabled for file /usr/bin/chage and it prevents Plesk from successful installation of packages.

  2. Incorrect SELinux context for the file

Resolution

  1. Remove immutable flag from file from error log:

    chattr -i /usr/bin/chage
  2. Restart upgrade process, or reinstall required packages manually.

If you want to remove immutable flag from all files in /usr/bin/ folder, you could use following command:

lsattr /usr/bin/* | grep "\\-\\i\\-" | awk '{print $2}' | while read d; do chattr -i $d;done

If the file attributes are fine and steps from above did not help, check if SELinux is enabled in Enforcing mode:

    # getenforce

Check SELinux context for the file, e.g.:

    # ls -Z /usr/local/psa/admin/sbin/deployer
-rwxr-x---. root root unconfined_u:object_r:plesk_deployer_t:s0 /usr/local/psa/admin/sbin/deployer

It should be system_u instead of unconfined_u . Restore context as follows:

    # restorecon -v -F /usr/local/psa/admin/sbin/deployer

Continue with upgrade.

Have more questions? Submit a request
Please sign in to leave a comment.