[Pkg-sysvinit-devel] Bug#636339: Missing directory structure in /var/run

Stefan Bühler stbuehler at lighttpd.net
Tue Aug 2 11:03:23 UTC 2011


Package: initscripts
Version: 2.88dsf-13.11
User: rleigh at debian.org
Usertags: run-transition

Hi!


Let me put this first: I think using a tmpfs for /var/run is a good idea.

But I think you have to be a little bit more careful.

The FHS states, that "Files under this directory must be cleared 
(removed or truncated as appropriate) at the beginning of the boot process."
And debian has always interpreted "Files" to mean "not a directory":
(from /lib/init/bootclean.sh)
   find . ! -xtype d ! -name utmp ! -name innd.pid -delete

And so I have been using custom sub directories like /var/run/lighttpd 
where I put FastCGI socket files. I use 0750 www-data:root on it, so 
only www-data processes can see the sockets, and I would like to keep it 
that way. I do *not* want to put those sockets directly in /var/run, as 
there is no reason for others to even *see* those sockets (file 
permissions on the socket would still prevent unauthorized connections).

I don't use init scripts, and even if i did, the runit FastCGI services 
might still get started before my init script.


So I need a simple way to have a persistent directory tree under 
/var/run (I guess we can agree that writing new rcS.d scripts isn't an 
option).



A second note:
You really should think about backporting. Especially server packages 
are a valid target for backporting, and those often use /var/run.
So i really suggest not to use /run in any source package for debian 
until all supported debian dists (including ubuntu) support /run, so we 
can still backport them. (core packages like udev can use /run ofc, 
backporting them is probably hell anyway :D)

Btw: https://build.opensuse.org/ provides backport overlays with current 
debhelper releases for ubuntu, so backporting is really not that hard.





More information about the Pkg-sysvinit-devel mailing list