Your message dated Fri, 6 Feb 2015 21:35:12 +0100
with message-id <[email protected]>
and subject line Re: Bug#777219: upgrade breaks when User != clamav
has caused the Debian Bug report #777219,
regarding upgrade breaks when User != clamav
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
777219: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=777219
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: clamav-freshclam
Version: 0.98.6+dfsg-1
Severity: Important

After upgrade from previous version to the newer where fixed #775400 we
break freshclam from upgrading the database if the owner was != clamav
say Debian-Exim with:

|ERROR: Can't create temporary directory 
/var/lib/clamav/clamav-431a9586a36e125909ede027609c7aa7.tmp
|Hint: The database directory must be writable for UID 101 or GID 103

it affects s-p-u and unstable. This is the proposed (untested) fix.

diff --git a/debian/clamav-base.postinst.in b/debian/clamav-base.postinst.in
--- a/debian/clamav-base.postinst.in
+++ b/debian/clamav-base.postinst.in
@@ -28,7 +28,16 @@ case "$1" in
   
   DATABASEDIR=/var/lib/clamav
   LOGDIR=/var/log/clamav
-  user=clamav
+
+  if [ -f /etc/clamav/freshclam.conf ]
+  then
+         user=$(grep ^DatabaseOwner /etc/clamav/freshclam.conf | awk '{print 
$2}')
+  elif [ -f /etc/clamav/clamd.conf ]
+  then
+         user=$(grep ^User /etc/clamav/clamd.conf | awk '{print $2}')
+  else
+         user=clamav
+  fi
   
   # Set up the clamav user on new install
   if [ -z "$2" ]; then


I would test it & prepare s-p-u & unstable package later today. But since
nobody noticed this breakage in unstable for a week it might not be that
serious after all or is it?

Sebastian

--- End Message ---
--- Begin Message ---
On Fri, Feb 06, 2015 at 02:38:16PM +0100, Andreas Cadhalpun wrote:
> Hi Sebastian,
Hi Andreas,

> How could the owner of /var/lib/clamav become something other than clamav?
I run clamav as Debian-exim user instead of clamav and have the user set in
clamd.conf and freshclam.conf. It was most likely manual as I didn't use
debconf earlier.

> clamav-base sets it to clamav and nothing ever changes it, even if one would
> manually change DatabaseOwner in freshclam.conf.
Correct.

> The only way I see is that someone manually chowned it. But I don't think
> that is supported, just as chowning e.g. /var/lib/apt isn't.
So that it is.

> >I would test it & prepare s-p-u & unstable package later today. But since
> >nobody noticed this breakage in unstable for a week it might not be that
> >serious after all or is it?
> 
> I would even say it's not really a bug, given that manually chowning in
> /var/lib should not be done. That might also explain, why nobody complained.

Sounds reasonable.

> However, if you think it's worth supporting, this patch (without the
> clamd.conf part) should be OK.

Nah. Well after you explained it then I noticed that it isn't really required.
Since clamd can run as debian-exim and freshclam as clamav so there is no real
reason to do what I did. Okay. So I change my setups and close this bug.

> Best regards,
> Andreas

Sebastian

--- End Message ---
_______________________________________________
Pkg-clamav-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-clamav-devel

Reply via email to