Solved

nginx 403 error with all request

Posted on 2013-06-08
8
642 Views
Last Modified: 2013-06-09
I have a nginx webserver with standard conf.
All requests return 403 error
In error log file, i have this info
... /jsGenerationForm/script_ES.js" failed (13: Permission denied), client ....

nginx is run with nobody user
file and folders has 777 permissions

What can be the solution?
thanks
0
Comment
Question by:soyglobal
  • 4
  • 3
8 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 39232149
You shouldn't be using nobody as a user, change it to nginx or some other limited user account - also make sure your files and folders are owned by the same user and that user is set in nginx.conf
And you shouldn't have permissions set to 777 for everything - they should be 644 except for any specific files/folders that need read/write permissions.
Also check the permissions on any parent folders for your web root.
0
 
LVL 13

Expert Comment

by:Sandy
ID: 39233260
if server is having cpanel then select nginx and re-compile the apache.

SA
0
 
LVL 58

Expert Comment

by:Gary
ID: 39233266
Why would he recompile Apache when he is using Nginx
0
 
LVL 13

Expert Comment

by:Sandy
ID: 39233271
i was specifically telling about cpanel, it has option for apache re-compile only.

SA
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 58

Expert Comment

by:Gary
ID: 39233293
He's using Nginx not Apache.
0
 
LVL 13

Expert Comment

by:Sandy
ID: 39233305
Gracy, i am totally agree of what you are saying but i was mentioning that if he is using cpanel then to re-compile nginx, there is only single option called "Re-compile Apache"

Hope you got what i mentioned.

SA
0
 

Author Comment

by:soyglobal
ID: 39233329
This experts exchange or a free forum?
Garyc123: thanks for your reply, i know don't should use nobody and 777 permissions. It was my last try, that theoricaly should work.
I try with www-data and nginx user, with same result.
Some idea?
Thx
0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 39233349
Check the owner of the complete folder structure not just the webroot - this will depend on your config as to what the structure is.  This is usually the #1 cause of the error....
Ownership is set on the webroot correctly but the parent folders have different owners
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now