On 2016-08-24 11:26:35 [+0100], Gavin Donald wrote: > I installed /clamav-daemon/ without problems but when trying to get it to > connect to /TCP:3310/ by adding the following lines:
I am not familiar with this / … / syntax. Is it just to highligt things? > TCPSocket 3310 > TCPAddr localhost (or using 127.0.0.1) > > into '//etc/clamav/clamd.conf/' and restarting with '/service clamav-daemon > restart/', and then using '/netstat -tap | grep clam/' there was no output. service? Not systemctl? Do you use SystemV oder SystemD? > I then > tried adding in: > > PidFile /var/run/clamav/clamd.pid > > and restarting again. Still no TCP socket was created but the > '/var/log/clamav.log/' shows: > > ERROR: Can't save PID in file /var/run/clamd.pid > ERROR: Can't unlink the pid file /var/run/clamd.pid > > I had expected the addition of the first two lines to create the first of > these files: > > /var/run/clamav/clamd.pid > /var/run/clamav/freshclam.pid > > but neither exist. The outpur of '/ls -l /var/run/' | grep clam/' after I > modifed the permissions is: > > drwxrwxrwx 2 root root 60 Aug 24 10:30 clamav /run/clamav should be created by the init script and owned by by $User. In case of systemd it is created by clamav-daemon.socket file. > Looking at the configuration automatically included below I see: > > PidFile disabled if run under systemd the PidFile is not required. > I am unsure if my inability to get a TCP socket is related to the error in > the log file. I can use clamscan without issues at the > '//var/run/clamav/clamd.ctl/' exists If you use it only localy then I would recommend the unix socket. It can be used clamdscan not to confuse with clamscan. To get TCP working, you would have to extend /etc/systemd/system/clamav-daemon.socket.d/extend.conf if you use systemd. The debconf template does this for you. > Thanks. Sebastian