Applicable to:
- Plesk for Linux
Symptoms
-
File system permissions cannot be repaired by
repair fs
command:# 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: -
After fixing
plesk repair fs example.com
still reports the same issue
Cause
Plesk bug with ID PPPM-4400 that will be fixed in future Plesk updates.
Resolution
Warning: The following script sets the permissions for files inside the document root to 0644
. In case there are files that require specific permissions, set them manually after executing the script, or restore a subscription backup.
As a workaround, correct the file permissions manually:
-
Connect to the server via SSH.
-
Download the script for fixing permissions and unpack it:
# wget https://plesk.zendesk.com/hc/article_attachments/360028145894/fix_permissions.tar.gz
# tar xf fix_permissions.tar.gz
-
Run the script with a target domain name, or a list separated by spaces:
# fix_permissions.sh example.com one.example.com two.example.com
Comments
8 comments
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.
@Jerry We have fixed the script. Thank you for reporting.
can run your chown on Cloudlinux:
Error: chown: ungültiger Benutzer: „+x“
@Lenor
Hello!
Step 3 of the resolution was updated. The correct command is:
# chmod +x fix.sh
Doesn't correct dot files.
Hello @Jason,
Could you, please, provide used OS, Plesk version and give an example of a file name, which was ignored by script from workaround.
@Alexandr
Just had to use the script (i think for some cases it is better to use the script, instead of plesk repair) and found out, the script misses those files/folders inside h.www_root if their name starts with a dot, or is does not restores the owner inside those folders. A small fix for me was to add an extra chown before doing the "psaserv restore" :
chown -chR "${query[0]/ /}":psacln "${query[1]/ /}"/.[0-9a-zA-Z]*
@Gergely Nagy
Thank you for noticing it!
The script was updated: now all chown and chmod commands are executed by `find`. It's a little bit slower but should behave better in edge cases.
Please sign in to leave a comment.