Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 4 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


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.