Cron and root and users -- SOLVED; D'oh
0 3 * * * /root/bin/daily >/tmp/cronlog 2>&1
and the /tmp file does not show up. The cron and crontab groups list root and myself.
I have also tried putting that shell script and an even simpler version of it in /etc/cron.daily and it does not run.
On to regular users. I can't even run crontab -e or -l; I get permission denied. /var/spool is rwxr-xr-x; cron is rwxr-x–- owned by root.cron, and crontab is rwx-wx--T owned by root.crontab.
This all appears exactly the same as another gentoo system where root and myself have working cron jobs.
I am doing something trivially wrong, I am sure, but I can't fire out what it is.
5 Replies
@Scarecrow:
On to regular users. I can't even run crontab -e or -l; I get permission denied. /var/spool is rwxr-xr-x; cron is rwxr-x–- owned by root.cron, and crontab is rwx-wx--T owned by root.crontab.
This all appears exactly the same as another gentoo system where root and myself have working cron jobs.
First guess: you're not in the 'cron' group. (Or you are but haven't logged out and back in yet.)
Let's hear your second guess:
@Scarecrow:
The cron and crontab groups list root and myself.
The second guess was related: /usr/bin/crontab is not setgid?
@bss:
The second guess was related: /usr/bin/crontab is not setgid?
Logged in and out a few times. But I don't think that matters anyway, since root shows a crontab but it doesn't run, and running doesn't care if the account is logged in or not.
The permissions of both cron and crontab are the same on a working system and this system.
I added the two accounts to the crontab group just for grins, and have since removed them to make it match a working system.
I suspect it's some kind of time related trickery and that one of these nights the cronjob will run for no apparent reason.
This is gentoo. Here is what fixed it:
rc-update add /etc/init.d/vixie-cron
Now I just need to fix my noggin. At least I knew it was going to be something trivial.