/var/cache/logwatch No such file or directory at /usr/sbin/logwatch line 633

Logwatch has been working perfectly until now. I read a tutorial that you shouldnt edit the config in the default place

/usr/share/logwatch

Instead you should move it to /etc/logwatch

So i did that and now i get this error

/var/cache/logwatch No such file or directory at /usr/sbin/logwatch line 633.

Does anyone know how to fix? Or should i just try removing the entry in /etc ?


The advice given in /usr/share/logwatch/default.conf/logwatch.conf is quite right. However, after copying the logwatch.conf you may just want to deactivate line 30 in /etc/logwatch/logwatch.conf (or /etc/logwatch/conf/logwatch.conf in some versions).

# TmpDir = /var/cache/logwatch

or, alternatively, create this directory with

sudo mkdir /var/cache/logwatch

That's it.


Either that advice was wrong, or you misunderstood it.

You should leave the default configuration in place, but you should make customisations in extra files in /etc/logwatch.

You need to undo what you have done, and then add your own customisations in /etc/logwatch.

logwatch reads the configuration in /usr/share/logwatch first, and then it reads your customisations from /etc/logwatch, but it won't work if the former isn't there.