Mailing List Archive

[clamav-users] Freshclam temp dir
Hi

I run "/usr/bin/freshclam --quiet  --on-update-execute=EXIT_1  " hourly
and find that the temporary directory is emptied but not removed from
/var/lib/clamav

when freshclam picks up the daily updates.  This appears to have been
occurring with 102 and latest 103 releases.

Am I missing something ?

Regards


root@myserver:/var/lib/clamav# ls -lh  | grep tmp

drwxr-xr-x 2 clamav clamav 4.0K Aug 23 14:57 tmp.01847
drwxr-xr-x 2 clamav clamav 4.0K Sep 23 15:53 tmp.0549c61dbd
drwxr-xr-x 2 clamav clamav 4.0K Aug 15 14:57 tmp.07b77
drwxr-xr-x 2 clamav clamav 4.0K Sep  8 15:56 tmp.0c355
drwxr-xr-x 2 clamav clamav 4.0K Sep  9 15:50 tmp.107c5
drwxr-xr-x 2 clamav clamav 4.0K Aug 30 14:52 tmp.1a1b9
drwxr-xr-x 2 clamav clamav 4.0K Sep 26 15:55 tmp.1f97f7b424
drwxr-xr-x 2 clamav clamav 4.0K Aug 10 14:51 tmp.24c0b
drwxr-xr-x 2 clamav clamav 4.0K Aug 20 14:56 tmp.2864d
drwxr-xr-x 2 clamav clamav 4.0K Sep  7 14:57 tmp.3474c
drwxr-xr-x 2 clamav clamav 4.0K Sep 11 15:57 tmp.37f84
drwxr-xr-x 2 clamav clamav 4.0K Sep  5 15:50 tmp.3d305
drwxr-xr-x 2 clamav clamav 4.0K Sep 24 15:49 tmp.41c7d98fda
drwxr-xr-x 2 clamav clamav 4.0K Aug 25 14:55 tmp.4ad9c
drwxr-xr-x 2 clamav clamav 4.0K Sep  3 14:51 tmp.4b737
drwxr-xr-x 2 clamav clamav 4.0K Sep 13 15:58 tmp.4f195
drwxr-xr-x 2 clamav clamav 4.0K Sep 27 15:50 tmp.5682ba8973
drwxr-xr-x 2 clamav clamav 4.0K Aug 26 14:51 tmp.59fdc
drwxr-xr-x 2 clamav clamav 4.0K Aug 27 14:55 tmp.5f337
drwxr-xr-x 2 clamav clamav 4.0K Sep 15 15:57 tmp.61efc
drwxr-xr-x 2 clamav clamav 4.0K Sep 25 15:53 tmp.77057ad964
drwxr-xr-x 2 clamav clamav 4.0K Sep 12 15:49 tmp.79234
drwxr-xr-x 2 clamav clamav 4.0K Sep 17 15:52 tmp.797511b446
drwxr-xr-x 2 clamav clamav 4.0K Sep  2 14:56 tmp.856b0
drwxr-xr-x 2 clamav clamav 4.0K Aug 17 14:55 tmp.8749f
drwxr-xr-x 2 clamav clamav 4.0K Sep 18 15:57 tmp.89f6d604ec
drwxr-xr-x 2 clamav clamav 4.0K Aug 22 14:53 tmp.8d9d6
drwxr-xr-x 2 clamav clamav 4.0K Aug 21 14:58 tmp.9459b
drwxr-xr-x 2 clamav clamav 4.0K Sep 28 15:55 tmp.97a352fd84
drwxr-xr-x 2 clamav clamav 4.0K Aug 16 14:53 tmp.a30df
drwxr-xr-x 2 clamav clamav 4.0K Aug 24 15:53 tmp.a37a7
drwxr-xr-x 2 clamav clamav 4.0K Sep  6 14:53 tmp.ae617
drwxr-xr-x 2 clamav clamav 4.0K Aug  9 14:50 tmp.b5f8a
drwxr-xr-x 2 clamav clamav 4.0K Sep  4 14:57 tmp.c0223
drwxr-xr-x 2 clamav clamav 4.0K Aug 13 08:58 tmp.c2512
drwxr-xr-x 2 clamav clamav 4.0K Aug 29 14:53 tmp.c53f8
drwxr-xr-x 2 clamav clamav 4.0K Aug 31 14:53 tmp.cb081
drwxr-xr-x 2 clamav clamav 4.0K Sep 20 15:58 tmp.d657a3d8a4
drwxr-xr-x 2 clamav clamav 4.0K Sep 10 15:49 tmp.e548c
drwxr-xr-x 2 clamav clamav 4.0K Sep 22 15:50 tmp.e6815329af
drwxr-xr-x 2 clamav clamav 4.0K Sep  1 14:58 tmp.ed79f
drwxr-xr-x 2 clamav clamav 4.0K Aug 28 14:57 tmp.eea32
drwxr-xr-x 2 clamav clamav 4.0K Sep 21 15:50 tmp.f58bdd0c55
drwxr-xr-x 2 clamav clamav 4.0K Sep 29 15:50 tmp.f6ffa0023f
r



_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: [clamav-users] Freshclam temp dir [ In reply to ]
Hi there,

On Tue, 29 Sep 2020, Paul via clamav-users wrote:

> I run "/usr/bin/freshclam --quiet? --on-update-execute=EXIT_1? " hourly and
> find that the temporary directory is emptied but not removed from
> /var/lib/clamav
>
> when freshclam picks up the daily updates.? This appears to have been
> occurring with 102 and latest 103 releases.
>
> Am I missing something ?

More information please. For example what is your operating system,
how was ClamAV installed on it, how are you running the command, which
user ID is executing freshclam, why do you want freshclam to return an
error code of 1 on a successful update (and have you tried running the
command without that (and why do you run the command hourly to get an
update which occurs only daily)), have you asked freshclam not to be
--quiet, have you configured freshclam to write in the log and have
you looked there, have you asked freshclam for more information (using
-v and/or --debug), can you let us see a copy of your freshclam.conf,
and any more stuff like that that you can think of.

--

73,
Ged.

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: [clamav-users] Freshclam temp dir [ In reply to ]
Hi

The problem of the undeleted tmp.xxxxx directory is caused by the use of
? --on-update-execute=EXIT_1

I have examined freshclam.c and it appears to me that on update
freshclam exits with status 1 via a? call to execute().

The call to execute() precedes? code which should remove the temp dir.


Thanks

On 30/09/2020 09:32, G.W. Haywood via clamav-users wrote:
> Hi there,
>
> On Tue, 29 Sep 2020, Paul via clamav-users wrote:
>
>> I run "/usr/bin/freshclam --quiet --on-update-execute=EXIT_1? "
>> hourly and find that the temporary directory is emptied but not
>> removed from /var/lib/clamav
>>
>> when freshclam picks up the daily updates.? This appears to have been
>> occurring with 102 and latest 103 releases.
>>
>> Am I missing something ?
>
> More information please.? For example what is your operating system,
> how was ClamAV installed on it, how are you running the command, which
> user ID is executing freshclam, why do you want freshclam to return an
> error code of 1 on a successful update (and have you tried running the
> command without that (and why do you run the command hourly to get an
> update which occurs only daily)), have you asked freshclam not to be
> --quiet, have you configured freshclam to write in the log and have
> you looked there, have you asked freshclam for more information (using
> -v and/or --debug), can you let us see a copy of your freshclam.conf,
> and any more stuff like that that you can think of.
>

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: [clamav-users] Freshclam temp dir [ In reply to ]
Interesting find. I guess this would be a bug.

Additional context for anyone curious:
--on-update-execute=EXIT_1 is a freshclam option to change the exit code from 0 to 1 so a user can differentiate between a successful run without an update and one with an update. It is a suggested use case in the freshclam manpage: https://github.com/Cisco-Talos/clamav-devel/blob/dev/0.104/docs/man/freshclam.1.in#L98

Care to file a bug report? https://bugzilla.clamav.net/enter_bug.cgi?product=ClamAV

-MIcah

-----Original Message-----
From: clamav-users <clamav-users-bounces@lists.clamav.net> On Behalf Of Paul via clamav-users
Sent: Thursday, October 1, 2020 7:42 AM
To: clamav-users@lists.clamav.net
Cc: Paul <paul@netpresto.co.uk>
Subject: Re: [clamav-users] Freshclam temp dir

Hi

The problem of the undeleted tmp.xxxxx directory is caused by the use of
? --on-update-execute=EXIT_1

I have examined freshclam.c and it appears to me that on update freshclam exits with status 1 via a? call to execute().

The call to execute() precedes? code which should remove the temp dir.


Thanks

On 30/09/2020 09:32, G.W. Haywood via clamav-users wrote:
> Hi there,
>
> On Tue, 29 Sep 2020, Paul via clamav-users wrote:
>
>> I run "/usr/bin/freshclam --quiet --on-update-execute=EXIT_1? "
>> hourly and find that the temporary directory is emptied but not
>> removed from /var/lib/clamav
>>
>> when freshclam picks up the daily updates.? This appears to have been
>> occurring with 102 and latest 103 releases.
>>
>> Am I missing something ?
>
> More information please.? For example what is your operating system,
> how was ClamAV installed on it, how are you running the command, which
> user ID is executing freshclam, why do you want freshclam to return an
> error code of 1 on a successful update (and have you tried running the
> command without that (and why do you run the command hourly to get an
> update which occurs only daily)), have you asked freshclam not to be
> --quiet, have you configured freshclam to write in the log and have
> you looked there, have you asked freshclam for more information (using
> -v and/or --debug), can you let us see a copy of your freshclam.conf,
> and any more stuff like that that you can think of.
>

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml