Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 lighttpd on a Debian Lenny host. My lighttpd version has a bug where it doesn't recreate its compress.cache-dir on startup (I have it set to use /tmp/lighttpdcompress/). As a result, on reboot, lighttpd fails to start. What can I do to have the system recreate this directory before it runs lighty's init script?

Thanks to all! I'm switching to a directory under /var/tmp to sidestep the problem.

share|improve this question
up vote 5 down vote accepted

Either modify your startup script to create it if it doesn't exist, or use a directory structure that won't get blasted at reboot time, like /var/tmp.

share|improve this answer
David, maybe add that this startup work could be done in /etc/rc.local – kbyrd Jun 1 '09 at 3:30
While possible, I disagree from a bit of a philosophical standpoint. Since the directory is necessary for the service to run, the initfile for that service should be responsible for creating it if it doesn't exist. Spreading things around in multiple files is a recipe for forgetting dependencies. – David Mackintosh Jun 2 '09 at 1:13

/tmp is cleared every reboot. /var/tmp is not.

Use /var/tmp instead, it's the convention

share|improve this answer

I can't up vote or comment at the moment, but I agree with David Mackintosh's answer. Just edit the init script for lighttpd to add "mkdir /tmp/lighttpdcompress' command. I have not looked a the script, but make sure you put the command in just before the execution of the lighttpd daemon statement.

share|improve this answer

Your Answer


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