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 spitted 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 package

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

# aptitude install clamfs

CVS

Source code of ClamFS is available form CVS repository.

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

$ cvs -d:pserver:anonymous@clamfs.cvs.sourceforge.net:/cvsroot/clamfs login
$ cvs -z3 -d:pserver:anonymous@clamfs.cvs.sourceforge.net:/cvsroot/clamfs co -P clamfs

Compilation

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

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

Go to directory created by tar:

$ cd clamfs-<version> # or clamfs for CVS sources

Use standard installation method:

$ ./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 Tue, 27 Nov 2007 12:55:11 -0800
Copyright (c) 2007 Krzysztof Burghardt <krzysztof@burghardt.pl>

 

SourceForge.net Logo   Valid XHTML 1.0!   Valid CSS!  
W3C Link Checker