I've written a simple bash script, and scheduled it to run as root with cron.
I'm directing all output to three different files on my desktop and when I manually run the script it works fine, when cron executes the script I get two empty output files on my desktop.
Cron is executing the script with root permissions so I can't figure out whats going on.
rkhunter --update > /home/soulful93/Desktop/Security_Rkhunter.txt
rkhunter -c --skip-keypress >> /home/soulful93/Desktop/Security_Rkhunter.txt
./chkrootkit > /home/soulful93/Desktop/Security_Chkrootkit.txt
freshclam > /home/soulful93/Desktop/Security_Freshclam.txt
By the way the Security_Chkrootkit.txt file always contains output. The Security_Rkhunter, and Freshclam are the two I'm having problems with. So, any ideas?