chown: `qscand': invalid user after qmail-scanner removal
chown: `qscand': invalid user after qmail-scanner removal
I installed clamAV from the atomic repo and qmail-scanner. I just removed qmail-scanner because it was causing issues due to spamassassian. Now when /etc/cron.hourly/freshclam runs it gives the error in the subject. I would like clamAV to update still and run monthly scans, can anyone let me know how to resolve this issue?
Re: chown: `qscand': invalid user after qmail-scanner remova
Change 'DatabaseOwner' in /etc/freshclam.conf from 'qscand' to 'root' or the ClamAV user, depending on your setup.
You might also want to change the 'User' setting in /etc/clamd.conf.
You might also want to change the 'User' setting in /etc/clamd.conf.
Lemonbit Internet Dedicated Server Management
Re: chown: `qscand': invalid user after qmail-scanner remova
default to use is clamav if you don't use root (which you need to id you use the ASL clamav<>FTP stuff).
You'll also need to manually run /etc/cron.hourly/freshclam (or just wait an hour) to get the logfile and signature files owned by the same user you specify.
The issue is that when you install qmail-scanner, a user qscand is created and it is that user that is set as the default db owner in freshclam.conf and user in clamd.conf. When you remove qmail-scanner, user qscand is removed, but the conf files are not changed. The hourly freshclam cronjob then tries to chown the logfile and the signature (database) files to qscand but this user doesn't exist anymore, hence the error you get.
You'll also need to manually run /etc/cron.hourly/freshclam (or just wait an hour) to get the logfile and signature files owned by the same user you specify.
The issue is that when you install qmail-scanner, a user qscand is created and it is that user that is set as the default db owner in freshclam.conf and user in clamd.conf. When you remove qmail-scanner, user qscand is removed, but the conf files are not changed. The hourly freshclam cronjob then tries to chown the logfile and the signature (database) files to qscand but this user doesn't exist anymore, hence the error you get.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
Re: chown: `qscand': invalid user after qmail-scanner remova
I changed /etc/freshclam.conf to DatabaseOwner clamav and it is still doing the same thing. /etc/clamd.conf has the user set as clamav so it seems like it should work, not sure where it is still getting that user from.
GNU nano 1.3.12 File: /etc/cron.hourly/freshclam
#!/bin/sh
### A simple update script for the clamav virus database.
### This could as well be replaced by a SysV script.
### fix log file if needed
LOG_FILE="/var/log/clamav/freshclam.log"
USER=`awk '/DatabaseOwner/ {print $2}' /etc/freshclam.conf`
if [ ! -f "$LOG_FILE" ]; then
touch "$LOG_FILE"
chmod 644 "$LOG_FILE"
chown $USER.$USER "$LOG_FILE"
fi
# User check event
chown -R $USER.$USER /var/clamav
/usr/bin/freshclam \
--quiet \
--datadir="/var/clamav" \
--log="$LOG_FILE" \
--verbose \
--daemon-notify="/etc/clamd.conf" 2>/dev/null
# Current 3rd party channel updater
#if [ -x /usr/bin/clamav_updater.sh ]; then
# /usr/bin/clamav_updater.sh >/dev/null 2>&1
#fi
GNU nano 1.3.12 File: /etc/cron.hourly/freshclam
#!/bin/sh
### A simple update script for the clamav virus database.
### This could as well be replaced by a SysV script.
### fix log file if needed
LOG_FILE="/var/log/clamav/freshclam.log"
USER=`awk '/DatabaseOwner/ {print $2}' /etc/freshclam.conf`
if [ ! -f "$LOG_FILE" ]; then
touch "$LOG_FILE"
chmod 644 "$LOG_FILE"
chown $USER.$USER "$LOG_FILE"
fi
# User check event
chown -R $USER.$USER /var/clamav
/usr/bin/freshclam \
--quiet \
--datadir="/var/clamav" \
--log="$LOG_FILE" \
--verbose \
--daemon-notify="/etc/clamd.conf" 2>/dev/null
# Current 3rd party channel updater
#if [ -x /usr/bin/clamav_updater.sh ]; then
# /usr/bin/clamav_updater.sh >/dev/null 2>&1
#fi
Re: chown: `qscand': invalid user after qmail-scanner remova
What is the exact error if you run "/etc/cron.hourly/freshclam"?
Lemonbit Internet Dedicated Server Management
Re: chown: `qscand': invalid user after qmail-scanner remova
chown: `qscand': invalid userprupert wrote:What is the exact error if you run "/etc/cron.hourly/freshclam"?