Solved

nginx 403 error with all request

Posted on 2013-06-08
8
650 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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
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

Don't Miss ATEN at InfoComm 2017!

Visit booth #2167 to see the  new ATEN VM3200 32 x 32 Modular Matrix Switch. Other highlights include the VE8950 4K HDMI Over IP Extender, VS1912 12-Port DP Video Wall Media Player  and VK2100 ATEN Control System. Register now with Free Pass Code ATEN288!

Question has a verified solution.

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

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
What You Need to Know when Searching for a Webhost Provider
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

738 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