Cannot change DocumentRoot: vhostmng-structure failed: Cannot create directory /var/www

Created:

2016-11-16 13:09:00 UTC

Modified:

2017-06-01 15:50:17 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Cannot change DocumentRoot: vhostmng-structure failed: Cannot create directory /var/www

Applicable to:

  • Plesk 12.5 for Linux

Symptoms

Cannot change DocumentRoot of a subdomain. The following error appears:

Error: hosting update is failed: vhostmng-structure failed: Cannot create directory /var/www: Permission denied System error 13: Permission denied

The settings get saved in Plesk, but do not get applied to Apache.

Cause

The desired DocumentRoot location is an incorrectly set symbolic link:

root@server:# ls -al /var/www/vhosts/example.com/777.example.com/current/web/backend
ls: cannot access /var/www/vhosts/example.com/777.example.com/current/web/backend: No such file or directory

root@server:# ls -al /var/www/vhosts/example.com/777.example.com
total 48
drwxr-x--- 8 example psaserv 4096 Feb 10 18:18 .
drwx--x--- 23 example psaserv 4096 Feb 10 10:52 ..
drwxr-xr-x 2 example psacln 4096 Feb 10 10:52 css
lrwxrwxrwx 1 example psacln 38 Feb 10 18:18 current -> /777.example.com/releases/1455121057 <------- there is no such path on the file system

Resolution

Re-create the link:

# rm -f /var/www/vhosts/example.com/777.example.com/current
# ln -s /var/www/vhosts/example.com/777.example.com/releases/1455121057 /var/www/vhosts/example.com/777.example.com/current
# ls -al /var/www/vhosts/example.com/777.example.com/current/web
total 16
drwxr-xr-x 4 example psacln 4096 Feb 10 11:45 .
drwxr-xr-x 5 example psacln 4096 Feb 10 12:08 ..
drwxr-x--- 5 example psaserv 4096 Feb 11 11:30 backend
drwxr-xr-x 2 example psacln 4096 Feb 10 11:46 frontend
Have more questions? Submit a request
Please sign in to leave a comment.