I'm deploying some software to Amazon EC2 using an automated script which calls yum to install all the packages I need.
The PHP module appears to be assuming that it's going to be working with Apache as the directory for storing session files (/var/lib/php/session) is owned by root/apache
ls -l /var/lib/php total 4 drwxrwx--- 2 root apache 4096 Jan 24 04:38 session
I have created a user for the website which is in the nginx group and so in the PHP-FPM config I have set PHP-FPM to run as: user = websitename group = nginx
So it isn't possible for PHP to access the directory that is meant to hold the session files.
Is there a way to tell Yum to install PHP-FPM with the group set to Nginx, and so for all the associated directories to have the correct group?
(Obviously I could just chown this directory but would prefer to install software in the 'correct' manner, rather than hacking it.)