Vous n'êtes pas identifié(e).
Pages : 1
Hors ligne
"Now using a text editor add these two lines to /etc/clamav/clamd.conf
sudo vim /etc/clamav/clamd.conf
TCPSocket 3310
TCPAddr 127.0.0.1
Save changes to clamd.conf
Make sure there are only the following two lines in /etc/systemd/system/clamav-daemon.socket.d/extend.conf
sudo vim /etc/systemd/system/clamav-daemon.socket.d/extend.conf
SocketUser=clamav
ListenStream=127.0.0.1:3310
Save changes to extend.conf
Enter the following since the clamav-daemon.socket changed on disk.
sudo systemctl daemon-reload
Enter the following:
sudo systemctl restart clamav-daemon.service clamav-daemon.socket clamav-freshclam.service
sudo systemctl status clamav-daemon.service clamav-daemon.socket clamav-freshclam.service
The status of the clamav-daemon.socket should be:
Listen: /run/clamav/clamd.ctl (Stream)
127.0.0.1:3310 (Stream)"
https://bbs.archlinux.org/viewtopic.php?id=233951
et avec cette remarque en particulier :
"I managed to get it working, although the configuration file still appears to be getting ignored regarding the socket definition.
I edited the socket definition like this:
$ systemctl edit clamav-daemon.socket
Redefined the listen options:
[Socket]
ListenStream=
ListenStream=/run/clamav/clamd.ctl
ListenStream=127.0.0.1:3310
Then reloaded the defintion and restarted the service, result:
$ systemctl stop clamav-daemon.service
Warning: Stopping clamav-daemon.service, but it can still be activated by:
clamav-daemon.socket
$ systemctl stop clamav-daemon.socket
$ systemctl daemon-reload
$ systemctl start clamav-daemon.service
Now init (systemd) is listening on port 3310"
je retrace ici mon adaptation dernière
configuration clamav
en root
reprise de /etc/clamav/clamd.conf
avec ceci :
#LocalSocket /var/run/clamav/clamd.ctl (autrement, ça bloque quelque chose avec la définition mise dans extend.conf, genre doublon...)
TCPSocket 3310
TCPAddr 127.0.0.1
reprise de /etc/systemd/system/clamav-daemon.service.d/extend.conf
avec uniquement ceci :
[Socket]
SocketUser=clamav
ListenStream=/var/run/clamav/clamd.ctl
ListenStream=127.0.0.1:3310
puis
$ systemctl edit --force clamav-daemon.socket
ça ouvre un fichier dans un éditeur du genre nano
où je mets strictement
[Socket]
ListenStream=
ListenStream=/var/run/clamav/clamd.ctl
ListenStream=127.0.0.1:3310
ensuite
$ systemctl daemon-reload
puis
$ systemctl restart clamav-daemon.service clamav-daemon.socket clamav-freshclam.service
puis je vérifie :
$ systemctl status clamav-daemon.service clamav-daemon.socket clamav-freshclam.service
ce qui me donne
● clamav-daemon.service - Clam AntiVirus userspace daemon
Loaded: loaded (/lib/systemd/system/clamav-daemon.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/clamav-daemon.service.d
└─extend.conf
Active: active (running) since Thu 2019-11-28 20:16:44 CET; 14s ago
Docs: man:clamd(8)
man:clamd.conf(5)
https://www.clamav.net/documents/
Main PID: 2428 (clamd)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/clamav-daemon.service
└─2428 /usr/sbin/clamd --foreground=true
nov. 28 20:16:44 carnet systemd[1]: Started Clam AntiVirus userspace daemon.
● clamav-daemon.socket
Loaded: loaded (/etc/systemd/system/clamav-daemon.socket; static; vendor preset: enabled)
Drop-In: /etc/systemd/system/clamav-daemon.socket.d
└─override.conf
Active: active (running) since Thu 2019-11-28 20:16:44 CET; 14s ago
Listen: /var/run/clamav/clamd.ctl (Stream)
127.0.0.1:3310 (Stream)
nov. 28 20:16:44 carnet systemd[1]: Listening on clamav-daemon.socket.
● clamav-freshclam.service - ClamAV virus database updater
Loaded: loaded (/lib/systemd/system/clamav-freshclam.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2019-11-28 20:16:43 CET; 16s ago
Docs: man:freshclam(1)
man:freshclam.conf(5)
https://www.clamav.net/documents
Main PID: 2426 (freshclam)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/clamav-freshclam.service
└─2426 /usr/bin/freshclam -d --foreground=true
où donc on a bien ceci pour clamav-daemon.socket :
Listen: /var/run/clamav/clamd.ctl (Stream)
127.0.0.1:3310 (Stream)
et à partir de quoi on peut installer puis configurer claws mail et le plugin clam antivirus de chez claws et compagnie...
on configure un premier compte mail pour lancer le client
puis on charge les plugins à partir de l'onglet /configuration/modules
où il est indiqué je cite :
"vous devez configurer le démon clamav afin qu'il communique via une socket TCP et opter pour la configuration manuelle de clamd." parce que les changements de permissions sur les dossiers ne fonctionnent pas... donc
on va dans /configuration/préférences/modules/clam anti virus
et
où il faut décocher la configuration automatique
et indiquer
pour hôte distant : 127.0.0.1
et pour Port : 3310
à partir de là
ça fonctionne, on n'a plus les alertes qui font peur...
voilà
merci ...de rien...
Dernière modification par paul-riluma (01-12-2019 23:10:45)
Hors ligne
Pages : 1