Solved

nginx 403 error with all request

Posted on 2013-06-08
8
649 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

 
LVL 13

Expert Comment

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

SA
0
 
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

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.:

735 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