Answer the question
In order to leave comments, you need to log in
Ubuntu Server: php-fpm running from www-data and security?
Good afternoon! I want to independently raise a combat server (not out of economy, but in order to figure it out).
Dedicated server, Ubuntu Server 13.04, nginx + php-fpm bundle. Only one project will be running on the server.
I train on a virtual machine, raised the server (nginx + php bundle) according to this instruction (in short, everything is standard).
Nginx and PHP run as user and group www-data. www-data user home directory: /var/www
In /etc/passwd
www-data:x:33:33:www-data:/var/www:/bin/sh
scandir('/')<br>
Answer the question
In order to leave comments, you need to log in
After starting the application, you can make a chroot, then the root for it will be, for example, /var/www (Google suggests that in php-fpm this can be set in the config, and then it will make this call itself). You can also configure access to individual files and directories for the www-data group.
I described here how to properly set up your hosting on your server so that each site works under “its own” user.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question