I have set up Samba with vscan-clamav and everything seems to be configured properly. However, when I try to access a Samba share from Windows I get the following error.

Open Folder
\\<share name> is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions.

A device attached to the system is not functioning.


When I comment out the following lines in smb.conf, I can access the shares but obviously the real-time virus scanning does not work.

vfs object = vscan-clamav
vscan-clamav: config-file = /etc/samba/vfs-config/vscan-clamav.conf

I have verified that clamav is running properly. I've also verified the following:

vscan-clamav.conf contains clamd socket name = /var/run/clamav/clamd.ctl which does exist.

The clamav user has ownership of the /var/run/clamav directory.

The clamav daemon is running.

What am I missing?


Look in your system log, you might see messages like this:

smbd_vfs_init: vfs_init_custom failed for vscan-clamav
vfs_init failed for service x

If so this may indicate that you don't have the vscan-clamav pluggable module on your system. If you have it, you should find it as a directory (or maybe a file?) at /usr/lib/samba or /usr/local/lib/samba. You need this module as well as running clamav.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.