LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-08-2008, 02:14 AM   #1
noir911
Member
 
Registered: Apr 2004
Posts: 682

Rep: Reputation: Disabled
ClamAV files filling up disk space


Under /var/tmp I've got more than a thousand files and directories (mostly files) like "clamav-5491055e667dc362b68dd9719c24f9c2" - these files are owned by defang:defang. I have moved (mv) some of them to a new location to reduce disk space. I just wonder if it's ok to just delete these files? I did a "file <filename>" on one of them and it says DOS executable (EXE). Not sure what these files are.

Thanks for any suggestions.
 
Old 10-08-2008, 02:18 AM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Do you have LeaveTemporaryFiles defined in clamd.conf by any chance?

Last edited by billymayday; 10-08-2008 at 02:19 AM.
 
Old 10-08-2008, 04:39 AM   #3
noir911
Member
 
Registered: Apr 2004
Posts: 682

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by billymayday View Post
Do you have LeaveTemporaryFiles defined in clamd.conf by any chance?
Nope. Here is my /usr/local/etc/clamd.conf file

Code:
LogFile /var/spool/MIMEDefang/clamd.log
LogFileMaxSize 10M
LogTime yes
PidFile /var/spool/MIMEDefang/clamd.pid
DatabaseDirectory /usr/local/lib/clamav
LocalSocket /tmp/clamd
LocalSocket /var/spool/MIMEDefang/clamd.sock
FixStaleSocket yes
User defang
ArchiveMaxFileSize 20M
 
Old 10-08-2008, 06:23 AM   #4
glyn3332
LQ Newbie
 
Registered: Oct 2008
Posts: 21

Rep: Reputation: 15
I had the same issue but what I did was work around it with this script:

PHP Code:
#! /usr/bin/php
<?php
    
echo "----------Spam Clean Start----------\n\n";
    
$dir '/var/virusmails/';
    
$fp opendir ($dir);
    while (
$file readdir ($fp)) {
        if (
$file == '.' || $file == '..') continue;
        if (!
is_file ($dir $file)) continue;
        
$command "rm " $dir $file;
        echo 
'Deleting: ' $command "\n";
        
shell_exec escapeshellcmd ($command) );
    }
    echo 
"----------Spam Clean End----------\n\n";
?>
I popped that in /etc/cron.daily to control it. Hope that helps but I'm sure someone has a better answer so I'll keep an eye on this thread

Last edited by glyn3332; 10-10-2008 at 07:31 AM.
 
Old 10-09-2008, 06:32 PM   #5
noir911
Member
 
Registered: Apr 2004
Posts: 682

Original Poster
Rep: Reputation: Disabled
I was just wondering if all the files under /var/tmp can be delete without causing any harm to anywhere else? If yes, I can just empty this directory every night.
 
Old 10-10-2008, 06:04 AM   #6
glyn3332
LQ Newbie
 
Registered: Oct 2008
Posts: 21

Rep: Reputation: 15
If I where you I would keep it targeted and limit to files that are a few hours old as you uploads from web apps if there are any on your server will be stored in there. But I can't see why not.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/var/log/messages filling up space. Asim Ahmed Linux - Newbie 1 04-09-2008 02:10 AM
Do device files occupy disk space? tarun301 Linux - General 1 12-15-2006 06:15 PM
Space is filling up Corrado Linux - General 2 09-12-2006 04:17 PM
rm'ing files doesn't free up disk space Earlw Fedora 4 03-06-2005 07:40 PM
3Gb of disk space lost! Disk space problem or mother board conflicts with HDD Mistreated Linux - Hardware 4 12-06-2004 04:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration