Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Dec 02, 2009 5:27 pm 
Offline
Junior Member

Joined: Mon Sep 22, 2008 12:28 am
Posts: 23
I can't seem to get cron working. Root has a crontab which I have edited with -e and listed with -l, and which is in /var/spool/cron/crontabs/root. The entry itself is
Code:
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.


Last edited by Scarecrow on Fri Dec 04, 2009 5:25 am, edited 1 time in total.

Top
   
PostPosted: Thu Dec 03, 2009 1:02 am 
Offline
Senior Newbie

Joined: Fri Jun 20, 2008 8:51 am
Posts: 9
Scarecrow wrote:
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.)


Top
   
PostPosted: Thu Dec 03, 2009 1:56 am 
Offline
Junior Member

Joined: Mon Sep 22, 2008 12:28 am
Posts: 23
First guess: you're not in the 'cron' group. (Or you are but haven't logged out and back in yet.)[/quote]

Let's hear your second guess:

Scarecrow wrote:
The cron and crontab groups list root and myself.


Top
   
 Post subject:
PostPosted: Thu Dec 03, 2009 2:14 am 
Offline
Senior Newbie

Joined: Fri Jun 20, 2008 8:51 am
Posts: 9
Bah. Reading comprehension was never my strong suit. In any event, you haven't said if you've logged out and back in as necessary. Are you in the cron group if you run 'groups' as your user? On the subject, on none of my Gentoo systems am I (or root, for that matter) in the crontab group. I'm skeptical that has much bearing on the matter, but thought I'd point it out.

The second guess was related: /usr/bin/crontab is not setgid?


Top
   
 Post subject:
PostPosted: Thu Dec 03, 2009 2:42 am 
Offline
Junior Member

Joined: Mon Sep 22, 2008 12:28 am
Posts: 23
bss wrote:
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.


Top
   
 Post subject: Arrrggggg!
PostPosted: Fri Dec 04, 2009 5:27 am 
Offline
Junior Member

Joined: Mon Sep 22, 2008 12:28 am
Posts: 23
I had forgotten to add cron to the startups.

This is gentoo. Here is what fixed it:

Code:
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.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group