Author Topic: Crontab versus commandline?  (Read 6947 times)

0 Members and 1 Guest are viewing this topic.

hvdkooij

  • Guest
Crontab versus commandline?
« on: December 19, 2004, 09:13:14 AM »
As part of my research I am testing Avast!  against a sizable collection of samples.
The odd thing is that while I can run my small script file  very well from the commandline.
It does not like it when I start it from a crontab job and ends with  a signal 6 on the first sample encoutered.

At present my script looks like:
#!/bin/sh

WORKDIR="/home/virus/collection"
LOGFILE="/home/virus/avast.lst"

export HOME=/home/hvdkooij
export LOGNAME=hvdkooij
export PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/hvdkooij/bin

# LIST THEM ALL!
time nice /usr/bin/avast -a -c -r ${LOGFILE} ${WORKDIR}

And the crontab job results:
file infectd by: Enrico-609
Command terminated by signal 6

PS: If someone from Alwill itself is listening perhap they could try to contact me directly. I was unable to get a response for my antivirus research project which now compares 20 antivirus products on over 20000 samples (http://viruspool.vanderkooij.org/)

Dublin

  • Guest
Re:Crontab versus commandline?
« Reply #1 on: December 21, 2004, 11:57:11 AM »
Try to send SIGINT signal from your crontab script.
« Last Edit: December 21, 2004, 11:58:19 AM by dublin »

hvdkooij

  • Guest
Re:Crontab versus commandline?
« Reply #2 on: December 21, 2004, 12:44:35 PM »
Why would I send SIGINT?

The probleems seems to me the program dies on a signal 6 when not executed from a commandline.
This looks more like a check in the software to prevent just this or a undocumented feature.

Dublin

  • Guest
Re:Crontab versus commandline?
« Reply #3 on: December 26, 2004, 09:26:26 PM »
I tested it on my box and it seemed to be OK. So sorry for misunderstanding.  :)
Can you tell me, what was your libavastengine.so library version and your linux distro? I think, the bug occured when the shared library was unloaded.

hvdkooij

  • Guest
Re:Crontab versus commandline?
« Reply #4 on: December 26, 2004, 11:18:37 PM »
Fedora Core 1 for now.  Will propably upgrade to Fedora Core 3 rather soon.

avast: avast v1.0.8
VPS: 0452-2 (date: 23.12.2004)
lrwxrwxrwx  1 root root      24 Dec 21 13:07 libavastengine.so -> libavastengine.so.4.5.12
lrwxrwxrwx  1 root root      24 Dec 21 13:07 libavastengine.so.4 -> libavastengine.so.4.5.12
-rwxr-xr-x  1 root root 1244064 Dec 21 13:07 libavastengine.so.4.5.12