VFS_VIRUSFILTER(8)

πŸ’– VFS_VIRUSFILTER πŸ’–

okay so bestie, welcome to vfs_virusfilter β€” that's the vfs_virusfilter(8) manual page, section 8, sysadmin tools, and yes we're reading it together, get comfy 🫢


✨ NAME ✨

vfs_virusfilter β€” On access virus scanner 🦠🚫


🌸 SYNOPSIS 🌸

vfs objects = virusfilter

πŸŽ€ DESCRIPTION πŸŽ€

So like, this is a whole set of various Samba VFS modules whose entire job is to scan and filter virus files on Samba file services using an anti-virus scanner. it's giving antivirus but make it Samba πŸ’…

and the tea: this module is stackable. yes bestie, it plays nice with the other modules, periodt.


🌈 OPTIONS 🌈

  • virusfilter:scanner β€” the antivirus scan-engine. pick your fighter:
    • sophos β€” the Sophos AV scanner πŸ›‘οΈ
    • fsav β€” the F-Secure AV scanner πŸ”’
    • clamav β€” the ClamAV scanner 🐚
    • dummy β€” the dummy scanner used in tests. it checks against the infected files parameter and flags any name that matches as infected. fake but functional fr fr πŸ™ˆ
  • virusfilter:socket path = PATH β€” the path of the local socket for the virus scanner.

if this option is not set, the default path depends on the configured AV scanning engine πŸ‘‡

for the sophos backend the default is /var/run/savdi/sssp.sock.

for the fsav backend the default is /tmp/.fsav-0.

for the clamav backend the default is /var/run/clamav/clamd.ctl.

  • virusfilter:connect timeout = 30000 β€” controls how long to wait on connecting to the virus scanning process before timing out. value is in milliseconds ⏱️

if this option is not set, the default is 30000.

  • virusfilter:io timeout = 60000 β€” controls how long to wait on communications with the virus scanning process before timing out. value is in milliseconds ⏳

if this option is not set, the default is 60000.

  • virusfilter:scan on open = yes β€” this option controls whether files are scanned on open πŸ‘€

if this option is not set, the default is yes.

  • virusfilter:scan on close = no β€” this option controls whether files are scanned on close πŸšͺ

if this option is not set, the default is no.

  • virusfilter:max file size = 100000000 β€” this is the largest sized file, in bytes, which will be scanned πŸ“

if this option is not set, the default is 100MB. (iconic that it says bytes and then the default is in MB, but that's the original, not me πŸ’€)

  • virusfilter:min file size = 10 β€” this is the smallest sized file, in bytes, which will be scanned 🐜

if this option is not set, the default is 10.

  • virusfilter:infected file action = nothing β€” what to do with an infected file. the options are nothing, quarantine, rename, delete. choose wisely bestie, this one has real consequences 😭

if this option is not set, the default is nothing.

  • virusfilter:infected file errno on open = EACCES β€” what errno to return on open if the file is infected.

if this option is not set, the default is EACCES.

  • virusfilter:infected file errno on close = 0 β€” what errno to return on close if the file is infected.

if this option is not set, the default is 0.

  • virusfilter:quarantine directory = PATH β€” where to move infected files. this path must be an absolute path ⚠️

if this option is not set, the default is ".quarantine" relative to the share path.

  • virusfilter:quarantine prefix = virusfilter. β€” prefix for quarantined files.

if this option is not set, the default is "virusfilter.".

  • virusfilter:quarantine suffix = .infected β€” suffix for quarantined files. this option is only used if keep name is true. otherwise it is ignored πŸ™…

if this option is not set, the default is ".infected".

  • virusfilter:rename prefix = virusfilter. β€” prefix for infected files.

if this option is not set, the default is "virusfilter.".

  • virusfilter:rename suffix = .infected β€” suffix for infected files.

if this option is not set, the default is ".infected".

  • virusfilter:quarantine keep tree = yes β€” if keep tree is set, the directory structure relative to the share is maintained in the quarantine directory 🌳

if this option is not set, the default is yes.

  • virusfilter:quarantine keep name = yes β€” should the file name be left unmodified other than adding a suffix and/or prefix and a random suffix name as defined in virusfilter:rename prefix and virusfilter:rename suffix.

if this option is not set, the default is yes.

  • virusfilter:infected file command = @SAMBA_DATADIR@/bin/virusfilter-notify --mail-to virusmaster@example.com --cc "%U@example.com" --from samba@example.com --subject-prefix "Samba: Infected File: " β€” external command to run on an infected file is found πŸ“£

if this option is not set, the default is none.

  • virusfilter:scan archive = true β€” this defines whether or not to scan archives πŸ“¦

Sophos and F-Secure support this and it defaults to false.

  • virusfilter:max nested scan archive = 1 β€” this defines the maximum depth to search nested archives πŸͺ†

the Sophos and F-Secure support this and it defaults to 1.

  • virusfilter:scan mime = true β€” this defines whether or not to scan mime files.

only the fsavscanner supports this option and defaults to false.

  • virusfilter:scan error command = @SAMBA_DATADIR@/bin/virusfilter-notify --mail-to virusmaster@example.com --from samba@example.com --subject-prefix "Samba: Scan Error: " β€” external command to run on scan error 😡

if this option is not set, the default is none.

  • virusfilter:exclude files = empty β€” files to exclude from scanning.

if this option is not set, the default is empty.

  • virusfilter:infected files = empty β€” files that virusfilter dummy flags as infected.

if this option is not set, the default is empty.

  • virusfilter:block access on error = false β€” controls whether or not access should be blocked on a scanning error.

if this option is not set, the default is false.

  • virusfilter:scan error errno on open = EACCES β€” what errno to return on open if there is an error in scanning the file and block access on error is true.

if this option is not set, the default is EACCES.

  • virusfilter:scan error errno on close = 0 β€” what errno to return on close if there is an error in scanning the file and block access on error is true.

if this option is not set, the default is 0.

  • virusfilter:cache entry limit = 100 β€” the maximum number of entries in the scanning results cache. due to how Samba's memcache works, this is approximate 🫠

if this option is not set, the default is 100.

  • virusfilter:cache time limit = 10 β€” the maximum number of seconds that a scanning result will stay in the results cache. -1 disables the limit. 0 disables caching 🚫

if this option is not set, the default is 10.

  • virusfilter:quarantine directory mode = 0755 β€” this is the octet mode for the quarantine directory and its sub-directories as they are created πŸ”

if this option is not set, the default is 0755 or S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH.

permissions must be such that all users can read and search. I.E. don't mess with this unless you really know what you are doing. like genuinely bestie, leave it alone πŸ’€
  • virusfilter:block suspected file = false β€” with this option on, suspected malware will be blocked as well. only the fsavscanner supports this option.

if this option is not set, the default is false.


πŸ‘‘ NOTES πŸ‘‘

this module can scan other than default streams, if the alternative datastreams are each backed as separate files, such as with the vfs module streams_depot 🌊

for proper operation the streams support module must be before the virusfilter module in your vfs objects list (i.e. streams_depot must be called before virusfilter module). order matters, no cap 🫢

this module is intended for security in depth by providing virus scanning capability on the server. it is not intended to be used in lieu of proper client based security. other modules for security may exist and may be desirable for security in depth on the server πŸ”βœ¨


🌟 AUTHOR 🌟

the original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed. legends only πŸ‘‘


and that's the whole page, bestie!! πŸ’– this is from Samba 4.8, dated 09/13/2026 β€” like that's the version, that's the date, that's the vibe. go forth and scan responsibly, mwah πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from