Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Permission denied error.log

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
10 posts • Page 1 of 1
alexcy
Posts: 256
Joined: Sun Jun 01, 2014 11:24 pm
Contact:
Contact alexcy
Website

Os: Ubuntu 15x
Web: nginx + php-fpm
Permission denied error.log
  • Quote

Post by alexcy » Thu Feb 04, 2016 6:55 pm

Hello,

My logs (var/log/nginx/domains/domain.tld.error.log) with the following error message:

2016/02/04 20:42:39 [crit] 2521#2521: *523691 open() "/home/user/web/domain.tld/public_html/" failed (13: Permission denied), client: xxx.xx.xx.xxx, server: domain.tld, request: "GET / HTTP/1.1", host: "domain.tld"

Can you please help me? this happens to two servers I have, running the same version. One is nginx+apache and the other one is nginx+php-fpm.

Thanks.
Top

tjebbeke
Collaborator
Posts: 783
Joined: Mon May 11, 2015 8:43 am
Contact:
Contact tjebbeke
Website

Os: CentOS 6x
Web: apache + nginx
Re: Permission denied error.log
  • Quote

Post by tjebbeke » Thu Feb 04, 2016 7:01 pm

Check the user and permissions of the file or directory.
Top

alexcy
Posts: 256
Joined: Sun Jun 01, 2014 11:24 pm
Contact:
Contact alexcy
Website

Os: Ubuntu 15x
Web: nginx + php-fpm
Re: Permission denied error.log
  • Quote

Post by alexcy » Fri Feb 12, 2016 7:53 am

User and permission are the default ones. I have seen other people posting in the Forum with similar problems as well.

Public_html is user:user

Any ideas?
Top

alexcy
Posts: 256
Joined: Sun Jun 01, 2014 11:24 pm
Contact:
Contact alexcy
Website

Os: Ubuntu 15x
Web: nginx + php-fpm
Re: Permission denied error.log
  • Quote

Post by alexcy » Tue Feb 16, 2016 9:46 am

Any ideas?
Top

tjebbeke
Collaborator
Posts: 783
Joined: Mon May 11, 2015 8:43 am
Contact:
Contact tjebbeke
Website

Os: CentOS 6x
Web: apache + nginx
Re: Permission denied error.log
  • Quote

Post by tjebbeke » Tue Feb 16, 2016 1:22 pm

Do you use some CMS? (WordPress? Drupal? Magento? ...).
When do you have this error? Every time you try to visit a page? Only at a specified request?
Top

alexcy
Posts: 256
Joined: Sun Jun 01, 2014 11:24 pm
Contact:
Contact alexcy
Website

Os: Ubuntu 15x
Web: nginx + php-fpm
Re: Permission denied error.log
  • Quote

Post by alexcy » Fri Feb 26, 2016 12:55 pm

I use WordPress and Drupal. It occurs in both cases, every time it is accessed.
Top

alexcy
Posts: 256
Joined: Sun Jun 01, 2014 11:24 pm
Contact:
Contact alexcy
Website

Os: Ubuntu 15x
Web: nginx + php-fpm
Re: Permission denied error.log
  • Quote

Post by alexcy » Tue Mar 15, 2016 12:34 pm

Nobody else has/had this problem?
Top

Nanotraktor
Posts: 129
Joined: Tue Mar 08, 2016 8:03 pm

Os: CentOS 6x
Web: nginx + php-fpm
Re: Permission denied error.log
  • Quote

Post by Nanotraktor » Wed Mar 16, 2016 5:40 am

be sure to perform in a public_html folder:

Code: Select all

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chown -R user:group *
of course, replace user and group to vesta username.
And there must be index.php or index.html.
This usually enough.
Last edited by Nanotraktor on Wed Mar 16, 2016 10:24 am, edited 1 time in total.
Top

alexcy
Posts: 256
Joined: Sun Jun 01, 2014 11:24 pm
Contact:
Contact alexcy
Website

Os: Ubuntu 15x
Web: nginx + php-fpm
Re: Permission denied error.log
  • Quote

Post by alexcy » Wed Mar 16, 2016 9:24 am

Thank you!
Top

drsdre
Posts: 12
Joined: Fri May 08, 2015 8:49 am

Re: Permission denied error.log
  • Quote

Post by drsdre » Wed Sep 27, 2017 3:42 pm

It looks like the problem is that the permissions on the public_html (public_shtml) directories are too tight. When VestaCP build the directories it assigns 751 permissions (drwxr-x--x). This causes NGINX to log the 13: Permissions denied error. When the permissions for both directories are changed to 755 (drwxr-xr-x, i.e. all can read), the error message is no longer present.

I assume this is because NGINX run under www-data needs direct access to the directory at some part of processing.

Andre
Top


Post Reply
  • Print view

10 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password