--- /etc/init.d/clamav-daemon.orig 2006-03-22 15:28:38.159237000 +0100 +++ /etc/init.d/clamav-daemon 2006-03-22 15:30:45.079237000 +0100 @@ -17,6 +17,7 @@ SUPERVISORNAME=daemon SUPERVISORPIDFILE="/var/run/clamav/daemon-clamd.pid" SUPERVISORARGS="--name=$NAME --respawn $DAEMON -F $SUPERVISORPIDFILE" +USER=$(grep "^User" /etc/clamav/clamd.conf | awk '{print $2}') [ -x "$DAEMON" ] || exit 0 [ -r /etc/default/clamav-daemon ] && . /etc/default/clamav-daemon @@ -58,6 +59,8 @@ case "$1" in start) + + chown $USER /var/run/clamav -R if [ -z "$RUN_SUPERVISED" ] ; then log_daemon_msg "Starting $DESC" "$NAME" start_daemon -p $THEPIDFILE $DAEMON