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 arenothing,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 invirusfilter:rename prefixandvirusfilter: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 thatvirusfilter dummyflags 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.-1disables the limit.0disables 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 thefsavscannersupports 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
- ubuntu stonking: samba 2:4.24.7+dfsg-1ubuntu1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms