Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Maybe i got the title wrong so correct me if it is

On system bootup i get the error

spawn-fcgi: opening PID-file '/var/run/php-fastcgi/php-fastcgi.pid' failed: Permission denied

What permission should i set php-fastcgi and what group/user is this being ran as? Would there be a problem if i simply use 777 (i get no errors and php works if i do this)

share|improve this question

1 Answer 1

up vote 2 down vote accepted

The actual init scripts are run as root. However, they will usually switch to a specific user when executing a daemon.

If you look at the /etc/init.d/php-fastcgi you'll see a start-stop-daemon line in the start() function, which has a --chuid parameter. The parameter says what user the daemon will run as.

It is usually a variable, and so pulled from a config script. If this is ubuntu/debian, this will be /etc/default/php-fastcgi - look in there for a parameter with the same variable name as the chuid parameter. This is the user that needs to have write access to the pid file.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.