Not possible to publish site in WPB: Permission denied

Created:

2016-12-12 03:46:29 UTC

Modified:

2017-08-08 13:37:14 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Not possible to publish site in WPB: Permission denied

Applicable to:

  • Plesk Onyx for Linux

Symptoms

It is not possible to publish website in Presence Builder. The following error is shown with enabled debug :

Unexpected server behavior. For details, see the product's log files.
Symfony\\Component\\Debug\\Exception\\ContextErrorException: Warning: file_put_contents(/usr/local/sb/htdocs/sites/29/29bc111bb797563fa728fc6f3fb26c06/robots.txt): failed to open stream: Permission denied
in /usr/local/sb/include/SB/Facade/Service/Site.php on line 445

Checking permissions recursively shows that folders inside sites have incorrect owner:

# ls -la /usr/local/sb/htdocs/sites
drwxr-xr-x 43 psaadm psaadm 4096 Nov 2 12:30 .
drwxr-xr-x 12 root root 4096 Aug 2 09:06 ..
drwxr-xr-x 3 nginx psaadm 4096 Feb 13 2015 05
drwxr-xr-x 2 nginx psaadm 4096 Oct 16 2015 06
drwxr-xr-x 3 nginx psaadm 4096 Jul 30 2014 09
drwxr-xr-x 3 nginx psaadm 4096 Jun 12 2014 12
drwxr-xr-x 2 nginx psaadm 4096 Oct 4 2014 16
drwxr-xr-x 2 nginx psaadm 4096 May 18 2015 23
drwxr-xr-x 2 nginx psaadm 4096 Sep 10 2014 28

Cause

Incorrect permissions, folders should be owned by psaadm user.

Resolution

Change owner to psaadm recursively:

# chown -R psaadm.psaadm /usr/local/sb/htdocs/sites/*
Have more questions? Submit a request
Please sign in to leave a comment.