From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20871 invoked by alias); 7 May 2004 05:06:05 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 20797 invoked from network); 7 May 2004 05:05:59 -0000 Received: from unknown (HELO main.gmane.org) (80.91.224.249) by sources.redhat.com with SMTP; 7 May 2004 05:05:59 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BLxYc-0003Qg-00 for ; Fri, 07 May 2004 07:05:58 +0200 Received: from h-67-102-25-114.lsanca54.covad.net ([67.102.25.114]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 May 2004 07:05:58 +0200 Received: from Andrew by h-67-102-25-114.lsanca54.covad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 May 2004 07:05:58 +0200 To: cygwin@cygwin.com From: Andrew DeFaria Subject: Re: CRON problems Date: Fri, 07 May 2004 06:55:00 -0000 Message-ID: References: <1083885162.409ac66a5ab06@topcat.ims.uaf.edu> <1083888621.409ad3eded2a0@topcat.ims.uaf.edu> <409AED9A.A91CA4A0@dessent.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.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> X-SW-Source: 2004-05/txt/msg00265.txt.bz2 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@Salira.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/