plesk repair fs doesn't set correct owner inside httpdocs

Created:

2017-03-16 16:50:44 UTC

Modified:

2017-08-16 14:13:34 UTC

0

Was this article helpful?


Have more questions?

Submit a request

plesk repair fs doesn't set correct owner inside httpdocs

Applicable to:

  • Plesk for Linux

Symptoms

1. Cannot repair file system:

# plesk repair fs example.com

There are incorrect permissions on some items in the root directory
of the domain 'example.com' ....................................... [ERROR]
To see more details, run the command in the verbose mode: plesk repair fs -verbose
Do you want to repair incorrect permissions? [Y/n] y
Repairing incorrect permissions ................................. [FIXED]
Error messages: 1; Warnings: 0; Errors resolved:

2. After fixing plesk repair fs example.com still reports the similar issue.

Cause

This is Plesk bug with ID #PPPM-4400 that will be fixed in future Plesk updates.

Resolution

As a workaround:

1. Create the file with #touch fix.sh

2. Insert the code below:

#!/bin/bash
VHOST_DIR="/var/www/vhosts"
MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin psa -sN -e"SELECT d.name, h.www_root, s.login FROM domains d, hosting h, sys_users s WHERE s.id=h.sys_user_id AND h.dom_id=d.id AND d.webspace_id=0" | while read domain www user; do
 chown -R $user.psacln $VHOST_DIR/$domain/httpdocs/*
done

3. Make it executable:

# chown +x fix.sh

4. Run it with ./fix.sh.

Have more questions? Submit a request

2 Comments

  • 0
    Avatar
    Jerry van Kranenburg

    Do not run this script, it will break your complete plesk installation!

    There is missing a /httpdocs at the end of the chown!

    "chown -R $user.psacln $VHOST_DIR/$domain/httpdocs"

    Otherwise also all logfiles and httpdocs and httpsdocs folder will change and all sites are down.

  • 0
    Avatar
    Alexander Tsmokalyuk

    @Jerry We have fixed the script. Thank you for reporting.

Please sign in to leave a comment.