Red Hat Bugzilla – Bug 486213
when cache dir is removed hald fails to start resulting in no devices for X
Last modified: 2009-02-19 03:33:02 EST
Description of problem:
after a wayward rm of mock cache /var/cache/hald/ was accidently removed. on restart there were no devices for X.
15:23:21.885 [E] create_cache.c:638: Unable to open fdi cache '/var/cache/hald/fdi-cache~' file for writing: No such file or directory
manualyy starting hald remotely gave the above output.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. rm -rf /var/cache/hald/
2. restart haldeamon
haldaemon fails to start
/var/cache/hald/ gets recreated and haldaemon starts up
considering cache dirs ar good targets for nuking either intentionally or accidently hald should recreate its cache dir if its missing on startup.
/var/cache/hald/ is a system directory with SELinux context, with specific owner and permissions. hald very quickly drops root privs, and therefore cannot recreate a directory with root:root, when running as hald. You shouldn't delete this directory, just like you shouldn't delete /var/cache/ccache.