user cron job not appearing on server /var/log/cron
Hello,
I was trying to debug some cron script for some users but when I tried to look in /var/log/cron, I didn't find any entries for any users. I can see all the entries for the root user, but not for anybody else:
I am running CentOS 6.9, Cloudlinux + CageFS + PHP Selector, but I also have to mention that this problem is also on CentOS 7.X. I also tried restarting the crond service, but there was no change. From what I know, all users' crons should be logged in the system's cron log in /var/log/cron. Was there some change along the way or is there some settings that I should change? Thank you.
Nov 1 15:21:01 ssd01 CROND[907489]: (root) CMD (/usr/share/optimumcache/perf_log.py --append)
Nov 1 15:21:01 ssd01 CROND[907490]: (root) CMD (/usr/bin/jetcli backup -R snapshots > /dev/null 2>&1)
Nov 1 15:21:01 ssd01 CROND[907492]: (root) CMD (/usr/bin/jetcli backup -R clone > /dev/null 2>&1)
Nov 1 15:21:01 ssd01 CROND[907499]: (root) CMD (/usr/share/optimumcache/optimumcache_purge 2>/dev/null)
Nov 1 15:21:01 ssd01 CROND[907494]: (root) CMD (/usr/bin/jetcli backup -R clearcache > /dev/null 2>&1)
Nov 1 15:21:01 ssd01 CROND[907497]: (root) CMD (/usr/bin/jetcli backup -R restore > /dev/null 2>&1)
Nov 1 15:21:01 ssd01 CROND[907498]: (root) CMD (/usr/bin/jetcli backup -R downloads > /dev/null 2>&1)
Nov 1 15:22:01 ssd01 CROND[908348]: (root) CMD (/usr/share/optimumcache/perf_log.py --append)
Nov 1 15:22:01 ssd01 CROND[908350]: (root) CMD (/usr/bin/jetcli backup -R clone > /dev/null 2>&1)
Nov 1 15:22:01 ssd01 CROND[908354]: (root) CMD (/usr/bin/jetcli backup -R clearcache > /dev/null 2>&1)
Nov 1 15:22:01 ssd01 CROND[908359]: (root) CMD (/usr/share/optimumcache/optimumcache_purge 2>/dev/null)
Nov 1 15:22:01 ssd01 CROND[908376]: (root) CMD (/usr/bin/jetcli backup -R restore > /dev/null 2>&1)
Nov 1 15:22:01 ssd01 CROND[908377]: (root) CMD (/usr/bin/jetcli backup -R snapshots > /dev/null 2>&1)
Nov 1 15:22:01 ssd01 CROND[908399]: (root) CMD (/usr/bin/jetcli backup -R downloads > /dev/null 2>&1)I am running CentOS 6.9, Cloudlinux + CageFS + PHP Selector, but I also have to mention that this problem is also on CentOS 7.X. I also tried restarting the crond service, but there was no change. From what I know, all users' crons should be logged in the system's cron log in /var/log/cron. Was there some change along the way or is there some settings that I should change? Thank you.
-
Hi, Would you happen to be running CSF(Config Server Security & Firewall)? If so, please check the 'RESTRICT_SYSLOG' directive at `/etc/csf/csf.conf'. If not, can you confirm the cron jobs are actually being executed for the users? You could do a simple test like '* * * * * date >> log' to confirm. Thanks, 0 -
This is because end user crontab tasks are executed within a jailshell. The jailshell does not have privileges to write to /var/log/cron. This has been an issue ever since crontab tasks started being executed in jailshell, which was many, many versions ago. 0 -
Hello, Yes, the cronjobs are running correctly. I know this is a pretty old problem, but I thought I could make it work again with some sort of cPanel/CageFS/CSF artifice. Would be useful to have this logged. I currently have RESTRICT_SYSLOG = "0", so there shouldn't be a problem, but it still doesn't write anything. If you can give me a few pointers, I would appreciate it. Thank you. 0
Please sign in to leave a comment.
Comments
3 comments