clamav-users March 2008 archive
Main Archive Page > Month Archives  > clamav-users archives
clamav-users: Re: [Clamav-users] restrict scan to local file sys

Re: [Clamav-users] restrict scan to local file systems

From: Brandon Perry <bperry.volatile_at_nospam>
Date: Fri Mar 07 2008 - 21:04:46 GMT
To: ClamAV users ML <clamav-users@lists.clamav.net>


I think --exclude(-dir) is more of what he is looking for. man clamscan will tell you all you need to know.

On Fri, 2008-03-07 at 12:48 -0800, Dennis Peterson wrote:
> On Fri, March 7, 2008 11:52 am, Jay Becker wrote:
> > Is there a way to force clamdscan to ignore network mounts (AFS, NFS,
> > SMB)? For example, if several workstations use NFS to mount several
> > directories on a server and I want all shared files to be scanned by
> > only the server and each client responsible for scanning their local
> > files. I know I could do a recursive scan using the exclude directory
> > option, but it seems fairly clumsy as the mounted directories vary and
> > there are quite a few clients. An option such as
> > --restrict-to-local-filesystems would be great, but afaik it doesn't
> > exist and I can't find evidence of other solutions (except for writing a
> > script to find all local files and pass them to clamdscan). Thanks!
> >
>
> Using clamdscan for this is probably the wrong idea unless clamd is
> running as root and that's also a wrong idea generally speaking. Using
> clamscan run as root gets around the privileges problems that clamd has
> when it is running as an privileged user.
>
> So if you read the man page for clamscan you will find this option:
>
> --include=PATT, --include-dir=PATT
> Only scan file/directory names containing PATT. It may be used multiple
> times.
>
> It works fine for what you're trying to do.
>
> dp
>



Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net http://lurker.clamav.net/list/clamav-users.html