I have a problem with nginx / php-fpm permissions.
I run a website in /var/www/clients/client1/web1/web, the owner:group of that folder and subfolders is web1:client1. When I try to create or upload a file with a PHP script in that folder i get a Permission Denied error because the new file get's created as www-data:www-data and it can't write to the folder (I have tested this by using the 777 permission).
How can I make it so nginx / php-fpm can write to those folders using web1:client1 and not www-data:www-data?
php-fpm pool file for that site:
[web1] listen = /var/lib/php5-fpm/web1.sock listen.owner = web1 listen.group = client1 listen.mode = 0660 user = web1 group = client1 pm = dynamic pm.max_children = 10 pm.start_servers = 2 pm.min_spare_servers = 1 pm.max_spare_servers = 5 pm.max_requests = 0 chdir = / php_admin_value[open_basedir] = /var/www/clients/client1/web1/web:/var/www/clients/client1/web1/private:/var/www/clients/client1/web1/tmp:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin php_admin_value[session.save_path] = /var/www/clients/client1/web1/tmp php_admin_value[upload_tmp_dir] = /var/www/clients/client1/web1/tmp