Karl E. Jorgensen
2009-Apr-07 09:52 UTC
[Logcheck-devel] Bug#515156: Same bug after removal + reinstall
I ran into the same problem after somebody uninstalled logcheck and I re-installed it. It turned out that the ownership of /var/lock/logcheck where root:root - sudo chown logcheck:logcheck /var/lock/logcheck solved it. I see that there already is a check for the permissions in the postinst which (as far as I can see) *should* have fixed the permissions and ownership there. When re-installing the logcheck package (which was previously removed, but not purged), dpkg will pass the version number of the most recently configured version [1] - which in this case would be 1.2.69. And since 1.2.69 >= 1.2.39, the chown+chmod in postinst is bypassed... I think that /var/lock/logcheck becamed owned by root:root upon reinstallation, as the .deb ships with it as root:root (but I have not been able to verify that). I think it would be sensible to do one (or both?) of: * chown+chmod unconditionally in postinst * make the ownership of /var/lock/logcheck logcheck:logcheck in the .deb Hope this helps [1] http://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#s-configdetails -- Karl E. J?rgensen http://www.jorgensen.org.uk http://karl.jorgensen.com
Frédéric Brière
2009-Aug-17 23:29 UTC
[Logcheck-devel] Bug#515156: Same bug after removal + reinstall
On Tue, Apr 07, 2009 at 10:52:11AM +0100, Karl E. Jorgensen wrote:> When re-installing the logcheck package (which was previously removed, > but not purged), dpkg will pass the version number of the most recently > configured version [1] - which in this case would be 1.2.69. And since > 1.2.69 >= 1.2.39, the chown+chmod in postinst is bypassed...Bingo.> I think it would be sensible to do one (or both?) of: > * chown+chmod unconditionally in postinst > * make the ownership of /var/lock/logcheck logcheck:logcheck in the .debThe latter is not an option, since the logcheck user does not have an assigned UID. I've therefore applied the former solution. Thanks for you analysis! -- <maswan> Joy: Lets fork cat! :) <maswan> Joy: imagine a big pitchfork and a dead kitten on top of it.. with blood running down..
Reasonably Related Threads
- Bug#542265: sendmail-base and logcheck-database: error when trying to install together
- Bug#287184: logcheck overwriting ownership/permissions of /etc/logcheck/* on upgrades
- Bug#312376: /etc/logcheck/logcheck.ignore is no longer read
- Re: [Logcheck-commits] CVS logcheck/debian
- End of search string question