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 »

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: 1376
Joined: Sat Dec 28, 2002 1:12 am
Location: Hong Kong

Post by MartynK »

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 »

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: 1376
Joined: Sat Dec 28, 2002 1:12 am
Location: Hong Kong

Post by MartynK »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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

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

Post by MartynK »

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 »

Sounds like a very good possibility.

Post Reply