PDA

View Full Version : Nothing in /var/log/cron



sky
02-26-2009, 01:24 AM
Hello

I have had a problem with a hacker putting lots of stuff in the squirrelmail directory (like 90go films and stuff).

To solv that i deleted squirrelmail and i installed ConfigServer Security & Firewall - csf v4.54.

Then i secured tmp dir explained here : http://www.directadmin.com/forum/showpost.php?p=150629&postcount=13

I also added munin, butr deleted since.


I dont know what i did wrhong, but nothing is added to /var/log/cron logs.
I checked if crond whas running and it is :
root 5438 0.0 0.0 3864 964 ? Ss 09:56 0:00 /usr/sbin/cron

Then i checked the directadmin_cron file and it does contain the correct lines.

* * * * * root /usr/local/directadmin/dataskq
2 0-23/6 * * * root echo 'action=vacation&value=all' >> /usr/local/directadmin/data/task.queue;
#5 5 * * 0 root /sbin/quotaoff -a; /sbin/quotacheck -augm; /sbin/quotaon -a;
10 0 * * * root echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue
20 4 1 * * root echo 'action=reset&value=all' >> /usr/local/directadmin/data/task.queue
0 4 * * * root echo 'action=check&value=license' >> /usr/local/directadmin/data/task.queue

I dont understand why no cron logs and written.

Ho yes, and the cron log file perms are : -rwxr-xr-x 1 root adm 0 2009-02-22 12:20 cron

I also forgot to say that i deleted some logs files my mistake, then recrated them.

Thaks for your help,
Sky

Peter Laws
02-26-2009, 04:57 AM
I found that DA looks at the wrong name:

DA looks for /var/log/cron

But the actual log is called /var/log/cron.log (on my Deb Etch boxes)

sky
02-26-2009, 05:23 AM
Hello,
Thx for your reply.

I did create the cron.log filer just in case, but nothing changed.

Things seam to be working on the server, but no logs about it.

I runned the set_permission.sh in case that helps, but did nothing to help.

So i still dont understand :)

Sky

squirrelhost
02-26-2009, 05:39 AM
On FreeBSD cron tasks are by default logged to
/var/log/cron

this is simply specified by the system default syslog.conf, i.e. the line

cron.* /var/log/cron


Nothing is 'looking' for where to log anything. On some linux systems I think you can set CRONLOG=YES (or NO) in some config files
to switch on, or off, cron logging also.

Maybe your system is set up to log nothing related to cron tasks

sky
02-26-2009, 06:03 AM
Hello again

The line
cron.* /var/log/cron.log
whas commented. (i uncommented it in case)


But, the logs did work before.
The problem is recent.

I cant stop thinking taht it is since i deleted some logs files, and then, i recreated them with, i hope, the right perms.

Regards,
Sky

nobaloney
02-26-2009, 09:16 AM
If you worry that your recreated log permissions could be causing a problem delete them.

The programs that need log files will create them if they don't exist.

Most programs log through the system logging daemon, syslogd.

Jeff

sky
02-27-2009, 01:14 AM
Hello

Well, that solved the problem with the logs.
Ill know that for next time, thanks a lot !

Sky