[Samba] vfs_virusfilter - clamav - Connecting to socket failed
Matthias Leopold
matthias.leopold at meduniwien.ac.at
Wed Apr 28 19:37:07 UTC 2021
Hi,
please take a look at https://bugzilla.samba.org/show_bug.cgi?id=14606
I haven't seen this error myself (I'm using recent Samba version from
SerNet), but this sounds similar.
I want to use vfs_virusfilter with clamd myself. Are you running clamd
as root or unprivileged user?
Matthias
Am 28.04.21 um 11:30 schrieb Zami3l via samba:
> Hello everyone,
>
> I am using vfs_virusfilter with clamav.
> I would like that as soon as a file is opened, it is scanned.
>
> System: CentOS Linux release 7.9.2009 (Core) (SELinux is disabled)
> Version Samba : 4.10.16
>
> The clamscan and smb services start correctly.
> No problem at first, the files are scanned well as soon as they are opened.
>
> If I save a file multiple times (e.g. xls or doc) in a very short period of time, I get this error:
>
> # /var/log/samba/samba_audit.log
> Apr 27 15:26:24 X smbd_audit: [2021/04/27 15:26:24.216663, 0, pid=14938] ../../source3/modules/vfs_virusfilter_clamav.c:59(virusfilter_clamav_scan_init)
> Apr 27 15:26:24 X smbd_audit: virusfilter_clamav_scan_init: clamd: Connecting to socket failed: #020؆U: Aucun fichier ou dossier de ce type
> Apr 27 15:26:24 X smbd_audit: [2021/04/27 15:26:24.216843, 0, pid=14938] ../../source3/modules/vfs_virusfilter.c:1095(virusfilter_scan)
> Apr 27 15:26:24 X smbd_audit: virusfilter_scan: Scan result: Error: /data/smb2/00-Projets/ldap.xlsx: Initializing scanner failed
> Apr 27 15:26:24 X smbd_audit: zami3l | xx.xxx.xxx.xxx | public NETWORK|pread_recv|ok|/data/smb2/00-Projets/ldap.xlsx
> Apr 27 15:26:24 X smbd_audit: [2021/04/27 15:26:24.902581, 0, pid=14938] ../../source3/modules/vfs_virusfilter_clamav.c:59(virusfilter_clamav_scan_init)
> Apr 27 15:26:24 X smbd_audit: virusfilter_clamav_scan_init: clamd: Connecting to socket failed: #020؆U: Aucun fichier ou dossier de ce type
> Apr 27 15:26:24 X smbd_audit: [2021/04/27 15:26:24.902705, 0, pid=14938] ../../source3/modules/vfs_virusfilter.c:1095(virusfilter_scan)
> Apr 27 15:26:24 X smbd_audit: virusfilter_scan: Scan result: Error: /data/smb2/00-Projets/ldap.xlsx: Initializing scanner failed
> Apr 27 15:26:24 X smbd_audit: [2021/04/27 15:26:24.907650, 0, pid=14938] ../../source3/modules/vfs_virusfilter_clamav.c:59(virusfilter_clamav_scan_init)
> Apr 27 15:26:24 X smbd_audit: virusfilter_clamav_scan_init: clamd: Connecting to socket failed: #020؆U: Aucun fichier ou dossier de ce type
> Apr 27 15:26:24 X smbd_audit: [2021/04/27 15:26:24.907749, 0, pid=14938] ../../source3/modules/vfs_virusfilter.c:1095(virusfilter_scan)
> Apr 27 15:26:24 X smbd_audit: virusfilter_scan: Scan result: Error: /data/smb2/00-Projets/ldap.xlsx: Initializing scanner failed
> Apr 27 15:26:24 X smbd_audit: zami3l | xx.xxx.xxx.xxx | public NETWORK|pread_recv|ok|/data/smb2/00-Projets/ldap.xlsx
> Apr 27 15:26:24 X smbd_audit: [2021/04/27 15:26:24.939625, 0, pid=14938] ../../source3/modules/vfs_virusfilter_clamav.c:59(virusfilter_clamav_scan_init)
> Apr 27 15:26:24 X smbd_audit: virusfilter_clamav_scan_init: clamd: Connecting to socket failed: #020؆U: Aucun fichier ou dossier de ce type
> Apr 27 15:26:24 X smbd_audit: [2021/04/27 15:26:24.939732, 0, pid=14938] ../../source3/modules/vfs_virusfilter.c:1095(virusfilter_scan)
> Apr 27 15:26:24 X smbd_audit: virusfilter_scan: Scan result: Error: /data/smb2/00-Projets/ldap.xlsx: Initializing scanner failed
>
> Smbd no longer succeeds in connecting with the clamdscan socket.
> However, it is still present and functional.
>
> After that, my only actions are:
> reboot smb service or Wait for the smbd process associated with my user to disappear
>
> [root at X ~]# ps aux | grep smbd
> zami3l 9394 0.0 0.1 560976 11412 ? S 09:29 0:00 /usr/sbin/smbd --foreground --no-process-group
> root 10453 0.0 0.1 569184 11456 ? S 10:09 0:00 /usr/sbin/smbd --foreground --no-process-group
> root 11606 0.0 0.0 112832 976 pts/0 R+ 11:04 0:00 grep --color=auto smbd
> [...]
> root 21759 0.0 0.0 503952 6848 ? S avril27 0:00 /usr/sbin/smbd --foreground --no-process-group
>
> I also sometimes have this error that appears :
>
> # smbd.log
> Apr 27 10:31:22 X smbd[8446]: [2021/04/27 10:31:22.338710, 0, pid=8446] ../../source3/modules/vfs_full_audit.c:624(do_log)
> Apr 27 10:31:22 X smbd[8446]: do_log() failed to get vfs_handle->data!
>
> Please do you have any idea why vfs_virusfilter can't reach clamd socket anymore?
>
> Configuration files are attached.
>
> Thank you in advance !
>
> Best Regards,
> Zami3l
>
>
--
Matthias Leopold
IT Systems & Communications
Medizinische Universität Wien
Spitalgasse 23 / BT 88 /Ebene 00
A-1090 Wien
Tel: +43 1 40160-21241
Fax: +43 1 40160-921200
More information about the samba
mailing list