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.

I'm running php5-fpm on Ubuntu using a UNIX socket at /var/run/php5-fpm/www.conf.sock. During the installation I have created manually the php5-fpm folder inside /var/run/ so that php5-fpm could create its socket in it, which it can. The problem is that whenever I restart my computer the php5-fpm folder disappears from /var/run and php5-fpm is no longer able to create the socket, thus every time I reboot I need to create the /var/run/php5-fpm/ folder again manually. I could put that routine in the /etc/init.d/php5-fpm startup script but am wondering the following:

Are there any reasons why the /var/run/php5-fpm/ folder should be removed upon reboot?

info: I'm running ubuntu 12.04 desktop (I'm planning on using the server version on a hosting but am for now doing some testing with the desktop version on my laptop).

share|improve this question

1 Answer 1

up vote 3 down vote accepted

If you run df -T, you will find a line similar to this:

none         tmpfs     1028284      3888   1024396   1% /var/run

This means that /var/run is a temporary file storage. So, it is not maintained between reboots.

You need to create the folder each time you start your service/daemon if not already created.

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.