3

Maybe I'm wrong, so before to ask my question, I'll explain a little what I'm trying to set up : I've a VPS where I want to have multiple users sites, with permission denied to all users to see the directories of others. It's a linux but the file-system supports only basic permissions (owner, group, other) and no ACL.

Thus I installed nginx which run as the user "nginx", then php-fpm with one pool per user running as the respective user.

Each "vhost" is listening a different port (8000 + user id - 1000) then :80 is a reverse proxy based on the domain used

That works fine with php files because fpm's pools have the read right ( it's running as the user ) . But for static files, it is directly nginx that handles them and it uses its user "nginx" which is not allowed...

I'd prefer really to be able to have each web files with 0700 or 0770 permission, so does exist a fcgi client to do that ( serving static files running as a defined user like php-fdm ) ? can fpm do that ? Or is it better to set 775 permissions ? (I could also add each user group to nginx but since some systems limit the number of groups a user can be in, I'm not sure it is a good idea...)

3
  • I saw that wich could do the trick in my case: serverfault.com/questions/370820/user-per-virtual-host-in-nginx, Ivan's comment. But It doesn't answer the question, and get access to all users folders to nginx... could be it a security issue ? (Nevertheless, I'll run all (f)cgi scripts as the user concerned)
    – hl037_
    Sep 9, 2014 at 16:45
  • Does someone have any news about this? Dec 5, 2014 at 17:11
  • nop still waiting for an answer... The only solution I have found is to restrict (like a chroot jail) the user to his home... easy to set up for ftp since most server support a root dir
    – hl037_
    Dec 7, 2014 at 14:33

0

You must log in to answer this question.

Browse other questions tagged .