avastcmd in crontab

hi,

I want avast to check my samba server on a regular bases for virusses.

My crontab looks like this:

0 20 * * * /usr/bin/avastcmd -a -c -i -t A -r /var/log/avast4/avast-scan.log /

But this command is never executed.

If I run this command manually as root everthing runs just fine.

Any hint is apreciated.

Hallo,
there might be various causes:

  1. is the command executed by cron or not? Try to replace it with something trivial, like “echo hello >somelogfile” etc.

  2. whis user this crontab belongs to? I suppose it’s different user than root (because You stated that avastcmd works fine under root), but then, are you able to run avastcmd manually under that user?

  3. when you are sure that the command IS executed, and WORKS normally, then prefix the /usr/bin/avastcmd with “strace -f >your.log 2>&1 /usr/bin/avastcmd …”, and analyse the “your.log” file (or paste it here and we’ll have look at it).

Regards,
PC

hi PC,

Yes… The command is executed.
It is the crontab of root.
See attachtment for the strace output.

Kind regards,

Bob

Thanks for the strace output, but there’s nothing suspicious - it looks like Your avastcmd did all the job properly, but at the end (right before exit_group(0)) there was no write() called.

Please, could You take the line from Your crontab, and run it manually? This second strace.log should be then compared with the original one. The whole problem seems to be in the final output (bad stdout redirection by the cron environment, try to redirect the output to file) or bad behavior of the engine library when unloaded (try to export LD_ASSUME_KERNEL=2.4.0 to the crontab-environment).

I’m unable to reproduce this bug with avastcmd2.0.1 & engine library 4.so.7.0.0, so please specify more details about this case.

Regards,
PC

I use OpenNA 2.0 RC2 as distro with kernel 2.6.17.8-1.

I installed libavastengine-4.7.0-i586.tar.gz and avast4server-2.0.0-i586.tar.gz

The libraries files:

lrwxrwxrwx 1 root bin 25 Dec 29 07:49 /usr/lib/libavastengine-4.so.6 → libavastengine-4.so.7.0.0
lrwxrwxrwx 1 root bin 25 Dec 29 07:45 /usr/lib/libavastengine-4.so.7 → libavastengine-4.so.7.0.0
-r–r–r-- 1 root bin 1745384 Dec 29 07:45 /usr/lib/libavastengine-4.so.7.0.0
lrwxrwxrwx 1 root bin 25 Dec 29 07:45 /usr/lib/libavastengine.so → libavastengine-4.so.7.0.0

As attachment I included:

strace command: strace -f >/tmp/avast.log 2>&1 /usr/bin/avastcmd -a -c -i -t A /boot

avast-console.log strace from console
avast-crontab.log strace from crontab
avast-kernel.log strace in bash shell script with export command triggered with crontab

All log files packed in Archive.log. This is a zip file so rename the extention to zip!

Kind regards

Bob

Hi support,

Any progress or hints?

Kind regards

Bop

hi,
it’s been fixed

Hi,

OK thanks…

But what’s the solution?
Where can I download the fix?

Regards,

Bob