I currently have my server setup as follows

  • A new linux user is created for every website
  • The websites root folder will be owned by this user and has 700 or 500
  • nginx runs as root:root so it can access these files
  • nginx passes PHP requests to a PHP-FPM pool for that specific website

Is there any way to not run nginx as root with this kind of setup, I don't know if it can cause any harm that it runs as root, but I'm not entirely comfortable with it.

Thanks, Xeross

link|improve this question

75% accept rate
feedback

2 Answers

How about using ACLs?

link|improve this answer
Hmm, I don't really want to patch my core for this and stuff, how big of a risk is there actually by running nginx as root ? – Xeross Aug 4 '10 at 8:18
feedback
up vote 0 down vote accepted

Decided to make the www-data group a member of all the groups that had www data.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.