I have a centos 6 server which using apache to connect php-fpm to run php site, i use user's home directory for the website root, for example /home/user1, . On the other hand, the php-fpm www.conf, the lines user and group i set to apache.
So, when the php write or create a file (e.g /home/user1/var/log/file), it will use apache:apache as owner. Then i need to run a command at /home/user1/var/log/ "chmod -R ug+s ." to make php to create a file as apache:user1 while user1 is group
So my question is, it is possible to set php-fpm to create file using the directory user owner (user1:user1) but not apache:apache