We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Permission denied error.log
Permission denied error.log
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.
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.
-
- Collaborator
- Posts: 783
- Joined: Mon May 11, 2015 8:43 am
- Contact:
- Os: CentOS 6x
- Web: apache + nginx
Re: Permission denied error.log
Check the user and permissions of the file or directory.
Re: Permission denied error.log
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?
Public_html is user:user
Any ideas?
Re: Permission denied error.log
Any ideas?
-
- Collaborator
- Posts: 783
- Joined: Mon May 11, 2015 8:43 am
- Contact:
- Os: CentOS 6x
- Web: apache + nginx
Re: Permission denied error.log
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?
When do you have this error? Every time you try to visit a page? Only at a specified request?
Re: Permission denied error.log
I use WordPress and Drupal. It occurs in both cases, every time it is accessed.
Re: Permission denied error.log
Nobody else has/had this problem?
-
- Posts: 129
- Joined: Tue Mar 08, 2016 8:03 pm
- Os: CentOS 6x
- Web: nginx + php-fpm
Re: Permission denied error.log
be sure to perform in a public_html folder:
of course, replace user and group to vesta username.
And there must be index.php or index.html.
This usually enough.
Code: Select all
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chown -R user:group *
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.
Re: Permission denied error.log
Thank you!
Re: Permission denied error.log
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
I assume this is because NGINX run under www-data needs direct access to the directory at some part of processing.
Andre