Subject: Re: CRON problems
From: Brian Dessent <[email-masked]>
To: [email-masked]
Date: Thu, 06 May 2004 18:59:54 -0700

Hank Statscewich wrote:

> Great suggestion. In /var/log/cron.log there were 17 lines of:
> /usr/sbin/cron: can't open or create /var/run/cron.pid: Permission denied
> 
> So I just changed permission of the file to 777 and cron started up just fine.
> I rebooted and lo and behold cron is still running. I'm changing permission
> back to something more appropriate now. I am now a fully satisfied cygwin user.
> Thansk for such a great port of linux onto windows, Cygwin is the best of both
> worlds (at least for now :)

Hmm, seems to me like checking ownership and permissions of cron.pid
would be something the cron_diagnose.sh should do.  What happened was
that you ran it initially as your normal user account, and the pid file
was created.  Then when you tried to start it as a service, it was
running as the SYSTEM account which didn't have permissions to overwrite
the file.  The solution would be to either just remove it and let cron
recreate it, or "chown SYSTEM:SYSTEM /var/run/cron.pid".  Then you could
give it more restrictive permissions than 777, perhaps 640 or 600.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/