public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Andrew DeFaria <Andrew@DeFaria.com>
To: cygwin@cygwin.com
Subject: Re: CRON problems
Date: Fri, 07 May 2004 06:55:00 -0000	[thread overview]
Message-ID: <c7f5fk$oih$1@sea.gmane.org> (raw)
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@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/

  reply	other threads:[~2004-05-07  5:06 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-06 22:47 Harig, Mark
2004-05-06 23:42 ` Hank Statscewich
2004-05-07  0:14   ` Igor Pechtchanski
2004-05-07  0:52     ` Hank Statscewich
2004-05-07  2:06       ` Brian Dessent
2004-05-07  6:55         ` Andrew DeFaria [this message]
2004-05-07  8:21           ` Brian Dessent
2004-05-07 15:06             ` Igor Pechtchanski
2004-05-07 15:23               ` Andrew DeFaria
2004-05-07 15:53                 ` Igor Pechtchanski
2004-05-07 20:08                   ` Andrew DeFaria
2004-05-07 15:20             ` Andrew DeFaria
  -- strict thread matches above, loose matches on Subject: below --
2008-05-14 22:18 cron problems Charles Miller
2008-05-14 22:28 ` Pierre A. Humblet
2007-11-06 15:30 Helge Stenström
2007-11-06 15:56 ` Pierre A. Humblet
2007-05-14 14:45 CRON problems sabbella
2007-05-14 17:39 ` Pierre A. Humblet
2006-07-24 23:29 Cron Problems Andrew King
2006-07-24 23:38 ` René Berber
2004-05-07 15:17 CRON problems Harig, Mark
2004-05-07 15:15 Harig, Mark
2004-05-07 15:20 ` Igor Pechtchanski
2004-05-07 15:12 Harig, Mark
2004-05-06  0:16 Hank Statscewich
2003-01-23 10:47 Cron Problems Wu Yongwei
2003-01-23 11:01 ` Elfyn McBratney
2003-01-23  6:24 Wu Yongwei
2003-01-23  9:48 ` Elfyn McBratney
2001-10-31  8:51 cron problems Lou Rayman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='c7f5fk$oih$1@sea.gmane.org' \
    --to=andrew@defaria.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).