Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Every time I upgrade php (via yum upgrade) on my CentOS box, my /var/lib/session folder ownership becomes root:apache with 600 permissions. I use nginx as my web server. This breaks my site and prevents sessions from being stored.

The fix is simply to chown nginx:nginx the folder. But I have to manually do this every time yum updates php.

I imagine the problem stems from the fact that when I initially set the box up I ran apache. Where can I change this config to "nginx" to fix this issue? I had a look in php.ini but couldn't see anything relevant in there. The session directory is specified, but nothing about the user.

share|improve this question
    
This is most likely a function of the RPM package being installed via yum. The php RPM that is installed is set to configure Apache HTTPD, not nginx. I'm not sure there's any way to get around it. –  ScoPi Mar 20 at 5:23
    
That was the conclusion I came to after doing some further googling when I got no responses. The "best" option seems to be to run nginx under an apache user/group, which seems a bit of a dirty kludge to me. –  Codemonkey Mar 24 at 13:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.