Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Okay, I just switched from an apache install with mod_ruid and php to an nginx install with php-fpm, now I was wondering how to secure this properly.

My old configuration with mod_ruid just had every site setup as a different linux user, and apache would run under this user when a request was made, and php also ran under this user.

However I have now switched to nginx and I'm kind of clueless as of how to run it properly, nginx needs to have access to all files and atm the files are all 700 or less, how would I set this up properly.

Another problem that's slightly unrelated I guess is that PHP-FPM apparently needs a pool of php processes for every user/group I run it under, is it possible to make em all use the same pool and just switch when needed ?

share|improve this question
up vote 2 down vote accepted

I 'solved' it by creating a PHP-FPM pool for every user, and running nginx as root, however I'm not entirely confident on that one (Alternatives are appreciated).

If I don't get any other answers I'll mark this one.


share|improve this answer

Why don't you leave www-data user? You just create an ftp user and add it to www-data group. Then chmod all the files with read/write perms for www-data group.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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