Plesk

Unable to move a domain in Plesk: site-copy failed: tar: ./subdirectory/<path>: Cannot open: Permission denied – Plesk

Symptoms

Cause

The subfolder(s) of the affected domain has incorrect ownership. 

Resolution

  1. Log into the server via SSH.

  2. Execute the command below to find the system user for the affected domain:

    # plesk db "select * from sys_users;" | grep example.com | awk {' print $6'}
    johndoe

  3. Run the command below to set the correct ownership with the correct system user and group for the subdirectory from the error: 

    # chown -R johndoe:psacln /var/www/vhosts/example.com/subdirectory

    Note: Apply the same command for each subdirectory in case there is more than one.