What Happened and Why
The errors you are seeing in Plesk’s Diagnose & Repair tool—specifically, “There is incorrect ownership on some items in the WWW root directory of the domain”—mean that some files or directories within your domains’ document root folders have file ownership or permissions that do not match what Plesk expects for secure and proper operation259. This can occur after migrations, manual file operations, or even due to certain Plesk bugs134.
You can use the “Repair” button directly in the Diagnose & Repair section of the Plesk GUI to attempt to fix these file system ownership and permission errors. This interface action triggers the same underlying repair utility as running the plesk repair fs command via SSH, and is designed to automatically correct common ownership and permission issues in your domains’ document roots318.
However, if the errors persist after clicking “Repair,” it may indicate either files that require special permissions or a bug in Plesk, as some issues cannot always be fixed automatically through the GUI or command line4. In such cases, manual intervention via SSH might be necessary for full resolution.
Since you have not manually changed permissions or ownerships, and if these errors appeared suddenly after using the Diagnose & Repair tool, it is plausible that this is a Plesk bug or a rare edge case4. If the repair action in the GUI does not resolve the warnings, consider checking Plesk’s support resources or forums for known issues, especially if you are running a recent update or a less common configuration.
It is generally recommended to update your Plesk packages before running repair operations, especially if updates are pending for core Plesk components. Updates often include bug fixes and improvements to tools like the Diagnose & Repair utility, and running the latest version can resolve known issues with file permissions and ownership repairs15.
If you run the repair before updating, you might encounter errors that have already been fixed in newer package versions, or the repair might not work as intended due to outdated scripts1. Therefore, update your Plesk packages first, then use the repair function in the Diagnose & Repair section59. This approach maximizes the chance that the repair will complete successfully and address all detected issues.
How to Fix the Errors When The Repair Button Fails:
1. Use Plesk’s Built-in Repair Tools
Plesk provides a command-line utility to automatically check and repair file system permissions and ownership for all domains or a specific domain:
- For all domains:text
plesk repair fs
- For a specific domain:text
plesk repair fs example.com -y
This command attempts to restore the default ownership and permissions for the domain’s files and directories89. In many cases, running this resolves the errors, and re-running the Diagnose & Repair tool should show no further issues18.
2. Manual Correction (If Issues Persist)
If the errors persist after running the repair command, you may need to manually adjust permissions and ownership via SSH:
- Set correct permissions for directories:text
find /var/www/vhosts/example.com/httpdocs/ -type d -exec chmod 0755 {} \;
- Set correct permissions for files:text
find /var/www/vhosts/example.com/httpdocs/ -type f -exec chmod 0644 {} \;
- Set correct ownership (replace
USERNAME
with the system user for the domain):textchown -R USERNAME:psacln /var/www/vhosts/example.com/httpdocs/
You can find the system user for each domain with:
textplesk db "select name, login from domains join hosting on domains.id=hosting.dom_id join sys_users on hosting.sys_user_id=sys_users.id" | grep example.com
3. Special Cases and Bugs
- If you see errors specifically about group ownership (e.g., expecting
psacln
but foundpsaserv
), this may be due to a known Plesk bug (ID #PPPM-12985). As a workaround, try disabling CGI support for the affected domains in the service plan and rerun the repair34. - If you use LiteSpeed or other custom setups, some warnings may persist due to how those services handle logs or directories6.
Additional Notes
- These errors do not always indicate a security breach, but incorrect permissions can pose a risk or cause site functionality issues25.
- If you have files that require custom permissions for application reasons, you may ignore the warnings for those specific files, but be aware of the security implications25.
- Always back up your data before running bulk permission or ownership changes.
Summary Table: Key Commands
Action | Command Example |
---|---|
Repair all domains | plesk repair fs |
Repair specific domain | plesk repair fs example.com -y |
Set directory permissions | find /var/www/vhosts/example.com/httpdocs/ -type d -exec chmod 0755 {} \; |
Set file permissions | find /var/www/vhosts/example.com/httpdocs/ -type f -exec chmod 0644 {} \; |
Set ownership | chown -R USERNAME:psacln /var/www/vhosts/example.com/httpdocs/ |
Conclusion
Run the plesk repair fs
command for your affected domains. If errors persist, manually set permissions and ownership as shown above. If you encounter persistent group ownership errors, check for known bugs and apply the suggested workarounds13489.
This Plesk Issue is an ONGOING Problem that Needs to be Fixed by PLESK
Plesk permission and ownership issues are a long-standing, well-documented problem, and you are not alone in experiencing them repeatedly—even across different servers and versions. Here’s a deep dive into the causes and why these problems persist:
Why Plesk Permission Issues Keep Happening
1. File Ownership and Upload Mechanisms
- Files uploaded via FTP are typically owned by the domain’s system user (e.g.,
username:psacln
), but files created by PHP scripts running under Apache may be owned byapache:apache
, and files manipulated by root (e.g., via SSH or tar extraction) may end up withroot
or1000:1000
ownership1. - This ownership mismatch leads to Plesk detecting “incorrect ownership” during scans, as it expects all files in the domain root to be owned by the domain user and group1.
2. Migrations and Manual Operations
- Migrating domains between servers often results in ownership and permission mismatches, even if you use Plesk’s migration tools2. Manual file operations (copying, extracting, moving files as root or another user) can also cause these issues.
3. Application-Specific Permissions
- Some web applications require custom permissions (e.g., writable directories for uploads or logs), which deviate from Plesk’s expected defaults (typically 755 for directories and 644 for files). Plesk’s repair tools may not “fix” these if it detects they are intentionally set, or it may flag them as suspicious3.
4. Plesk Bugs and Limitations
- There are documented cases where, even after running the repair tool, the same warnings or errors return, especially for system directories like
/logs
or with certain web server configurations (e.g., LiteSpeed)4. Some issues cannot be fixed automatically by the repair tool and require manual intervention34. - Plesk’s own documentation and forums note that the repair tool (
plesk repair fs
) is not always able to resolve every issue, particularly if files require non-standard permissions for application functionality35.
5. Recurring Warnings
- Some warnings are persistent by design, especially if the files or directories need special permissions, or if the repair tool cannot determine the correct state (such as with third-party software or after customizations)34.
Community and Documentation Feedback
- Many users on Plesk forums and support channels report having to regularly run repair commands or manually adjust ownership after migrations, uploads, or application updates21.
- There is frustration in the community about the repetitive nature of these issues, and some users note that the repair tools and documentation often repeat the same solutions without addressing underlying causes or offering permanent fixes26.
Official Stance
- Plesk acknowledges in their documentation that not all permission and ownership issues can be fixed automatically and that some warnings may be safely ignored if the permissions are intentionally set for application needs35.
- They recommend manual intervention for persistent or application-specific cases and suggest that users submit feedback if the experience should be improved3.
Summary Table: Common Triggers
Trigger | Resulting Issue | Repairable by Tool? |
---|---|---|
FTP upload | Correct ownership | Yes |
PHP/Apache upload (mod_php) | apache:apache ownership | Sometimes |
Manual SSH/tar extraction as root | root/1000:1000 ownership | Sometimes |
Migrations | Mixed/incorrect ownership | Sometimes |
Application-required custom perms | Flags as suspicious | No (by design) |
LiteSpeed or custom web server setups | Persistent logs warnings | No |
Conclusion
Plesk’s permission and ownership issues are rooted in how Linux handles file creation by different users and processes, combined with the platform’s strict expectations for security and consistency. The problem is exacerbated by migrations, manual operations, and application requirements. While Plesk provides tools to help, they are not foolproof, and some issues require manual fixes or are simply persistent warnings341. This is a well-known pain point in the Plesk community and is discussed frequently in forums and official documentation1268.
Leave a Reply