Hi Dominik, 2016-10-06 23:15 GMT+02:00 Dominik George <n...@naturalnet.de>: > Hi, > >> IMO it is unreasonable to think that removing the whole >> /var/cache/forked-daapd directory can be deleted and is expected to be >> recreated because many services drop root privileges thus can't create >> dirs in /var/cache: > >> In my interpretation of the FHS the _files_ can be removed and are >> expected to be recreated, while _directory structures_ need to be kept >> for applications to operate. > > I do not quite agree. > > The same would be true for /var/run, but there, the application or the > init system is expected to create the relevant directories before > dropping privileges.
/var/run is different, see very different wording in FHS. http://www.pathname.com/fhs/2.2/fhs-5.13.html#FN37 5.13 /var/run : Run-time variable data 5.13.1 Purpose This directory contains system information data describing the system since it was booted. Files under this directory must be cleared (removed or truncated as appropriate) at the beginning of the boot process. Programs may have a subdirectory of /var/run; this is encouraged for programs that use more than one run-time file.[footnote 37] ... [37] /var/run should be unwritable for unprivileged users (root or users running daemons); it is a major security problem if any user can write in this directory. Process identifier (PID) files, which were originally placed in /etc, must be placed in /var/run. The naming convention for PID files is <program-name>.pid. For example, the crond PID file is named /var/run/crond.pid. Cheers, Balint