ClamWin files in Scratch not deleting

Discussions on webmail and the Professional version.
JasonCMX
Posts: 33
Joined: Fri Apr 09, 2004 12:22 pm
Location: Michigan, USA

ClamWin files in Scratch not deleting

Post by JasonCMX » Thu Oct 21, 2004 5:19 pm

I have Pro v1.5e with SNIMTA and ClamWin.
The Scratch file folder has several (as in over 20) folders with "clam" as the beginning of the name.
I am unable to delete these files. I am receiving a "Cannot not delete file _name_: Access is denied. The source file may be in use."
How do I delete these folders? They could quickly eat up space.

MartynK
Posts: 1363
Joined: Sat Dec 28, 2002 1:12 am
Location: Hong Kong

Post by MartynK » Thu Oct 21, 2004 10:22 pm

Are you running ClamWin as a realtime scanner ?

I have just looked in my scracth folder and there are only files left over by ME (which is common on my system) there are no clam* files.

MailEnable
Site Admin
Posts: 4441
Joined: Tue Jun 25, 2002 3:03 am
Location: Melbourne, Victoria Australia

Post by MailEnable » Thu Oct 21, 2004 10:40 pm

I have not used Clam but I would think there may be some instances of the command line scanner left running - hence the file locking. Might want to check task manager and kill of any residuals - then remove the lock files.

Most probably, Clam cmd line scanner has failed under load and has suspended with an error - MTA eventually gives up waiting and tries to terminate the process - which it possibly was not able to do. Hence you get left overs.
Regards, Andrew

MartynK
Posts: 1363
Joined: Sat Dec 28, 2002 1:12 am
Location: Hong Kong

Post by MartynK » Thu Oct 21, 2004 10:57 pm

What do you class as "Load".

When I initially worked out the config and tested this, I created 500 emails, 250 with the Eicar virus in them. I got them all delivered to the SMTP server before starting the MTA.

Each ran through OK without any problems (that I could see). I did not have any blocked or dead processes, 250 virus emails where found and 250 normal ones delivered.

MailEnable
Site Admin
Posts: 4441
Joined: Tue Jun 25, 2002 3:03 am
Location: Melbourne, Victoria Australia

Post by MailEnable » Thu Oct 21, 2004 11:03 pm

We have not "Load" tested clam so we dont know how many threads will cause it to fail. Memory, IO, other processes etc can all contribute. Load as a cause was speculative - it could also be any number of other things - eg: Clam conflicting with other real time scanner, no delete permissions on scratch directory, etc.
Regards, Andrew

JasonCMX
Posts: 33
Joined: Fri Apr 09, 2004 12:22 pm
Location: Michigan, USA

Post by JasonCMX » Fri Oct 22, 2004 12:07 pm

I running Clam as setup here by paarlberg:
http://forum.mailenable.com/viewtopic.p ... 0&start=15

Clam is a wonderful product, I'm just confused as why it creates folders I can delete.

paarlberg
Posts: 1071
Joined: Tue Mar 02, 2004 7:33 pm
Location: Atlanta, GA, USA

Post by paarlberg » Sat Oct 23, 2004 7:53 am

The reason Clam/ME cannot delete the files is due to rights to delete. It appears that the clamxxxxxx.mai folders do not have the same security settings. If you try to delete the items in the scratch folder, the clamxxxxx.mai folders will not delete. You have to take ownership of the scratch folder and all sub-folders to delete them.

I am changing my ME services to run as an account with admin rights to see if that fixes the problem.

My feeling is that it is related to the MTA not releasing the files/folders.

MailEnable
Site Admin
Posts: 4441
Joined: Tue Jun 25, 2002 3:03 am
Location: Melbourne, Victoria Australia

Post by MailEnable » Sat Oct 23, 2004 8:48 am

If changing the ownership or running in a different security context addresses the issue; the problem is very unlikely to be that the MTA is holding handles to the files. Also, this would be the case irrespective of the a/v engine used.
Last edited by MailEnable on Sun Oct 24, 2004 1:40 pm, edited 1 time in total.
Regards, Andrew

paarlberg
Posts: 1071
Joined: Tue Mar 02, 2004 7:33 pm
Location: Atlanta, GA, USA

Post by paarlberg » Sun Oct 24, 2004 12:26 pm

A little over 24 hours and not a single clamav-xxxxxxx.mai folder or file. Looks to have corrected it. Will update during the week when usage is much higher.

paarlberg
Posts: 1071
Joined: Tue Mar 02, 2004 7:33 pm
Location: Atlanta, GA, USA

Post by paarlberg » Mon Oct 25, 2004 6:18 am

Update..

So far it works and no problems. I have processed about 800 e-mails since making the change on Saturday. Will post any relevant updates. Should have about 1100-1500 messages today so that will be a good test.

paarlberg
Posts: 1071
Joined: Tue Mar 02, 2004 7:33 pm
Location: Atlanta, GA, USA

Post by paarlberg » Mon Oct 25, 2004 7:13 am

Didn't work..

I still get the clamav-xxxxx.mai folders that are not accessible by administrator. Only the creator/owner can access them. However, I haven't seen any of the files that were being created before at the root of the scratch folder.

The folder owner is the service account that was created for ME.

paarlberg
Posts: 1071
Joined: Tue Mar 02, 2004 7:33 pm
Location: Atlanta, GA, USA

Post by paarlberg » Tue Oct 26, 2004 6:28 am

No progress.. the files are now showing up again.

JasonCMX
Posts: 33
Joined: Fri Apr 09, 2004 12:22 pm
Location: Michigan, USA

Post by JasonCMX » Tue Oct 26, 2004 1:05 pm

Would changing the maximum number of receive threads help with this?

MartynK
Posts: 1363
Joined: Sat Dec 28, 2002 1:12 am
Location: Hong Kong

Post by MartynK » Mon Nov 15, 2004 4:30 pm

I put out a large mailing the other day that had my processor running at 100%. I have since been in the scratch folder and there were a number of calm scratch dirs which I could not delete.

After restarting the MTA, for another reason, I found that I could delete the temp dirs.

Could this mean that it is the MTA the for some reason is holding the dirs and stopping them from being deleted ?

paarlberg
Posts: 1071
Joined: Tue Mar 02, 2004 7:33 pm
Location: Atlanta, GA, USA

Post by paarlberg » Mon Nov 15, 2004 4:38 pm

Sounds like a very good possibility.

Post Reply