Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

nginx 403 error with all request

Posted on 2013-06-08
8
Medium Priority
?
668 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
Introducing the WatchGuard 420 Access Point

WatchGuard's newest access point includes an 802.11ac Wave 2 chipset, providing the fastest speeds for VoIP, video and music streaming, and large data file transfers. Additionally, enjoy the benefits of strong security as the 3rd radio delivers dedicated WIPS protection!

 
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 2000 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

Looking for the Wi-Fi vendor that's right for you?

We know how difficult it can be to evaluate Wi-Fi vendors, so we created this helpful Wi-Fi Buyer's Guide to help you find the Wi-Fi vendor that's right for your business! Download the guide and get started on our checklist today!

Question has a verified solution.

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

​Being a Managed Services Provider (MSP) has presented you  with challenges in the past— and by meeting those challenges you’ve reaped the rewards of success.  In 2014, challenges and rewards remain; but as the Internet and business environment evol…
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.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

715 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