ClamFS Project Page. Welcome!

ClamFS is a FUSE-based user-space file system for Linux with on-access anti-virus file scanning through clamd daemon.

Features

  • User-space file system (no kernel patches, recompilation, etc.)
  • Configuration stored in XML files
  • FUSE (and libfuse) used as file system back-end
  • Scan files using ClamAV
  • ScanCache (LRU with time-based and out-of-memory expiration) speeds up file access
  • Sends mail to administrator when detect virus

Idea

ClamFS is completely user-space anti-virus solution for Linux. It uses libfuse and Linux kernel module to provide file system. ClamAV is used as anti-virus scanner.
ClamFS -- Linux user-space file system
(click on image to enlarge)

Normally program (or library) uses glibc open() call to obtain file descriptor. Glibc calls kernel VFS to open file regardless of file system used. If file is on ClamFS file system open call from VFS is directed to user-space by FUSE. ClamFS calls libfuse to communicate with FUSE and through it with VFS. (see below)
Linux VFS -- How program opens a file Linux VFS -- How program opens a file through ClamFS

Internals

ClamFS Internals -- ClamFS consist of four parts
ClamFS is split into four parts:

  • libfuse bindings -- used to communicate with FUSE (and with VFS through it),
  • ScanCache -- store (per file) results of anti-virus scanning to speed up future open() requests
  • ScanQueue -- queue files for scanning
  • clamd / libclamav bindings -- communicate with anti-virus scanner

Simplified flow chart for ClamFS:
ClamFS flow chart -- simplified view of ClamFS

Implementation

Refer to sources :^)

Performance

Visit ClamFS benchmark page.

SourceForge.net Project Page

Bug tracker, feature requests, patches, support requests, news... go to sf.net/projects/clamfs

Download

Download packages form one of SourceForge mirrors.

Debian & Ubuntu packages

If you are a Debian GNU/Linux user try to install clamfs package:

# aptitude install clamfs

Ubuntu have clamfs package in universe component.

SVN

Source code of ClamFS is available form Subversion repository.

If you like you can get latest revision form SVN repository:

$ svn checkout svn://svn.code.sf.net/p/clamfs/code/trunk clamfs-svn

Old SVN

On 23rd of April 2013 SourceForge upgraded their infrastructure and moved ClamFS repository to new location. The old repository is read-only now. All its users should switch to new one. Refer to Repository Upgrade FAQ for more information.

Ancient CVS

Before SVN ClamFS was maintained in CVS repository. On 27th of December 2008 it was migrated to Subversion. CVS is no longer in use and all its users should switch to Subversion. Older source code of ClamFS is (still) available form CVS repository for reference.

Compilation

If you downloaded source package unpack it (if you have got sources form SVN omit this step):

$ tar zxf clamfs-<version>.tar.gz 

Go to directory created by tar:

$ cd clamfs-<version> # or clamfs(-svn) for SVN sources

Use standard installation method:

$ ./autogen.sh (if you have got source package omit this step)
$ ./configure
$ make
# make install

Configuration

Copy file doc/clamfs.xml to /etc/clamfs/<some_name>.xml. Than edit to fit your needs.

Ready... STEADY... GO!

Start file system daemon with:

# clamfs /etc/clamfs/<some_name>.xml

 

Last updated on Sun, 15 Dec 2013 01:27:31 +0000
Copyright (c) 2007-2013 Krzysztof Burghardt <krzysztof@burghardt.pl>

 

Get ClamFS at SourceForge.net. Fast, secure and Free Open Source software downloads   Valid XHTML 1.0!   Valid CSS!  
W3C Link Checker