How to scan share folder using Clamav

Friday, August 10, 2007 | Label: | |

At our office, we have a problem. Various viruses were detected in our Maxtor storage server. Yes, it's a public file server. And Maxtor didn't have any antivirus tool. So, the only solution is to mount it using Samba and scan it with Clamav.

How to do it?

First, create a folder where it's your mount point.

mkdir [Mount point]

2nd, mount your storage server using Samba

mount -t smbfs //[Maxtor IP address]/[Shared folder] /mnt/[Mount point]/

3rd, put your mount point into fstab

//[MAxtor IP address]/[Shared folder] /mnt/[Mount point] smbfs defaults 0 0

4th, if you want it to work automatically, just write the automatization into crontab

crontab -e

Put this line below into it,

00 07 * * * clamscan --move=/root/karantina -r /mnt/
00 11 * * * clamscan --move=/root/karantina -r /mnt/
00 15 * * * clamscan --move=/root/karantina -r /mnt/
00 19 * * * clamscan --move=/root/karantina -r /mnt/

*)
"karantina" is the folder name from which we move the infected file.
"--move=[Folder repository]" is the command to move the infected file into a specific folder.

Update :
Mbon, dah dibenerin :P

2 komentar:

  1. Anonymous says:

    So, solution is only mount it using Samba and then scan it with Clamav.

    correction :
    So, the only solution is to mount it using Samba and then scan it with Clamav.

    4th, if you want it works otomatically, just write otomatication into crontab

    correction :
    4th, if you want it to works automatically, just write in the automatication into crontab

    otomatically -> wakss campuran jawa sama english nih :p

  2. Me.! says:

    wahahaha... bisa aja ente mbon mbon... :P