Solved

nginx 403 error with all request

Posted on 2013-06-08
8
645 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Hello EE, Today we will learn how to send all your network traffic through Tor which is useful to get around censorship and being tracked all together to a certain degree. This article assumes you will be using Linux, have a minimal knowledge of …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

813 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

15 Experts available now in Live!

Get 1:1 Help Now