Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com From: Andrew DeFaria Subject: Re: CRON problems Date: Thu, 06 May 2004 22:05:55 -0700 Lines: 49 Message-ID: References: <1083885162 DOT 409ac66a5ab06 AT topcat DOT ims DOT uaf DOT edu> <1083888621 DOT 409ad3eded2a0 AT topcat DOT ims DOT uaf DOT edu> <409AED9A DOT A91CA4A0 AT dessent DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet AT sea DOT gmane DOT org X-Gmane-NNTP-Posting-Host: h-67-102-25-114.lsanca54.covad.net User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) In-Reply-To: <409AED9A.A91CA4A0@dessent.net> Brian Dessent wrote: > 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. You should also check the ownership/permissions of /var/cron* and /var/log/cron.log. When I setup cron I normally do: # Make sure that certain directories and files do not exist! This is to let # cron create them, which appears to be the only way to get these created # correctly! if [ ! -d /var/cron ]; then rm -rf /var/cron rm -rf /var/run/cron.pid rm -rf /var/log/cron.log # Install cron service: cygrunsrv -I cron -p /usr/sbin/cron -a -D -d "Cygwin cron" -e "MAILTO=$USER AT Salira DOT com" -e "CYGWIN=ntsec" fi # Start cron service cygrunsrv -S cron -- 3 kinds of people: those who can count & those who can't. -- 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/