Permission denied for the ngnix: 13: Permission denied

Created:

2017-06-13 09:14:11 UTC

Modified:

2017-08-16 15:53:55 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Permission denied for the ngnix: 13: Permission denied

Applicable to:

  • Plesk Onyx 17.5 for Linux

Symptoms

Restriction to follow symlinks setting with Smart static files processing caused the "Permission denied" error. The following error can be found in /var/www/vhosts/example.com/logs/proxy_error_log file:

[error] 54202#0: *11723 openat() "/var/www/vhosts/example.com/httpdocs/wp-content/themes/twenty-minutes/css/default.css" failed (13: Permission denied)

Cause

This is a Plesk bug with ID PPPM-6440 which is planned to be fixed in the future Plesk updates.

Resolution

As a workaround, create a custom configuration template. For that:

  1. Create the /usr/local/psa/admin/conf/templates/custom/domain/ directory (if there is no such folder yet) with the command:

    # mkdir /usr/local/psa/admin/conf/templates/custom/domain
  2. Copy and paste the required template from default to custom directory:

    # cp -p /usr/local/psa/admin/conf/templates/default/domain/nginxDomainVirtualHost.php /usr/local/psa/admin/conf/templates/custom/domain/nginxDomainVirtualHost.php
  3. Modify the template. Replace the string below in /usr/local/psa/admin/conf/templates/custom/domain/nginxDomainVirtualHost.php :

    disable_symlinks if_not_owner;

    with that string:

    disable_symlinks if_not_owner from=$document_root;
  4. Go to the Plesk > Domains > example.com > Apache & nginx settings and press Apply / Ok .

  5. Clear browser cache and access the example.com site again.

Additional Information

Changing Virtual Hosts Settings Using Configuration Templates

Have more questions? Submit a request
Please sign in to leave a comment.