Applicable to:
- Plesk for Linux
Symptoms
-
Plesk Obsidian running on a Linux-based operating system
-
The domain
example2.com
shows the following error message after moving it to another subscription (example.com) via Domains > example2.com > Move Domain:CONFIG_TEXT: 403 Forbidden
You don't have permission to access / on this server.
Server unable to read htaccess file, denying access to be safe -
An error that is similar to the following appears in Plesk > Domains > example2.com > Logs:
CONFIG_TEXT: [core:crit] (13)Permission denied: AH00529:/var/www/vhosts/example.com/example2.com/httpdocs/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/vhosts/example.com/example2.com/httpdocs/' is executable, referer: https://example2.com/
-
A file system check via the
plesk repair fs example2.com
command provides output that is similar to the following:CONFIG_TEXT: There is incorrect ownership on some items in the WWW root directory of the domain 'example2.com' ........................................... [ERROR]
- Incorrect group of /var/www/vhosts/example.com/example2.com/httpdocs:
expected is psaserv (1002), actual is psacln (1003) -
The ownership of the directory that is designated as a Document Root for the domain for the domain was changed after the website was moved:
# ls -ld /var/www/vhosts/example.com/example2.com/httpdocs/
drwxr-x--- 2 user psacln 4096 Sep 2 09:16 /var/www/vhosts/example.com/example2.com/httpdocs/Note: The psaserv group is expected for this directory instead of psacln.
Cause
Incorrect permissions or ownership for the httpdocs
directory of the example2.com domain and its contents
Resolution
Repair the permissions and ownership for the affected domain by following these steps:
-
Connect to the server via SSH
-
Execute the following file system repair command:
# plesk repair fs example2.com -y
Click on a section to expand
1. Log into your server via SSH
2. Find the system user tied to the affected domain by executing the following command:
# plesk 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 example2.com
The expected output would be similar to the following:# root@server:/var/www/vhosts/example2.com# plesk 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 example2.com
| example2.com | exampl2 |
3. Correct the ownership of the /var/www/vhosts/example.com/example2.com
directory by using the system user while executing the following command:
# chown exampl2:psaserv /var/www/vhosts/example.com/example2.com
4. Enter the directory by executing the following command:
# cd /var/www/vhosts/example.com/example2.com
5. Set the correct permissions and ownership for all directories and files within that directory by executing the following commands:
# find . -type d -exec chmod 755 {} \;
# find . -type f -exec chmod 644 {} \;
# find . -type d -exec chown exampl2:psacln {} \;
# find . -type f -exec chown exampl2:psacln {} \;
Comments
0 comments
Please sign in to leave a comment.