Package: amavisd-new
Version: 20030616p10-5
Severity: important
When running amavisd-new as a different user than amavis:amavis,
restarting the daemon forces the owner of /var/run/amavis to
amavis:amavis and then the amavisd process can't write inside this
folder anymore.
This is because of this line in the package postinst script:
dpkg-statoverride --update amavis amavis 755 $i
Each time the daemon is restarted, this script is launched :
fixdirs() {
dir=$(dpkg-statoverride --list /var/run/amavis) || {
echo "You are missing a dpkg-statoverride on
/var/run/amavis.
Fix it, otherwise you risk silent breakage on upgrades." >&2
exit 1
}
[ -z "$dir" ] || createdir $dir
# clear exit status
:
}
with createdir :
createdir() {
# $1 = user
# $2 = group
# $3 = permissions (octal)
# $4 = path to directory
[ -d "$4" ] || mkdir -p "$4"
chown -c -h "$1:$2" "$4"
chmod -c "$3" "$4"
}
I don't know how to fix this in the Debian package (I don't know if it's
something to fix as amavis user and group are created in the same
postinst script).
A simple workaround for (strange) people who are running amavis as a
different user than amavis is to do a dpkg-statoverride with your
user/group (proxy/proxy in this example) :
dpkg-statoverride --remove /var/lib/amavis
dpkg-statoverride --remove /var/lib/amavis/virusmails
dpkg-statoverride --remove /var/run/amavis
dpkg-statoverride --update --add proxy proxy 755 /var/lib/amavis
dpkg-statoverride --update --add proxy proxy 755
/var/lib/amavis/virusmails
dpkg-statoverride --update --add proxy proxy 755 /var/run/amavis
(but package upgrade may break this :/ )
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15
Locale: LANG=en_US.ISO-8859-15, LC_CTYPE=en_US.ISO-8859-15 (charmap=ISO-8859-15)
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]