I’m migrating my site from one server to another. I did a new install on the target server and everything seemed to work fine. I even brought the new code over and everything worked fine still. Something has recently changed though and now I’m getting the following error:
PHP Warning: session_start() [<a href=’function.session-start’>function.session-start</a>]: open(/var/lib/php/session/sess_tpchih293l77fuvv03pkqqdsf2, O_RDWR) failed: Permission denied (13) in /var/www/vhosts/power10solutions.com/httpdocs/manager/includes/config.inc.php on line 59, referer:
http://power10solutions.com/manager/
The permissions on /var/lib/php/session are 757 and the owner/group are "root" and "apache". I changed it 777 and it started working. Any ideas? What user is the PHP code being executed as? What should I be looking for?
Update: When I change it to 777, I notice the files are written by user/group = apache/apache. The owner/group for the session folder is root/apache so I’m either going to change the owner to apache or change the perms to 775 or 770.