Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

---------------------------
OK   
---------------------------

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?

share|improve this question
add comment

1 Answer 1

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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