Your message dated Fri, 29 Apr 2005 10:46:33 -0500
with message-id <[EMAIL PROTECTED]>
and subject line Bug#306949: fails to reload when /etc/cron.d symlink target 
permissions change
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 29 Apr 2005 15:20:18 +0000
>From [EMAIL PROTECTED] Fri Apr 29 08:20:18 2005
Return-path: <[EMAIL PROTECTED]>
Received: from mail.metronet.co.uk [213.162.97.75] 
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1DRXHu-0004A5-00; Fri, 29 Apr 2005 08:20:18 -0700
Received: from tollcross.aaroncrane.co.uk (tollcross.aaroncrane.co.uk 
[84.51.130.212])
        by smtp.metronet.co.uk (MetroNet Mail) with ESMTP
        id A950F40DF89; Fri, 29 Apr 2005 16:20:04 +0100 (BST)
Received: from aaron by tollcross.aaroncrane.co.uk with local (Exim 4.34)
        id 1DRXHr-0007vE-U6; Fri, 29 Apr 2005 16:20:15 +0100
Date: Fri, 29 Apr 2005 16:20:15 +0100
From: Aaron Crane <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: fails to reload when /etc/cron.d symlink target permissions change
Message-ID: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.6+20040907i
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

Package: cron
Version: 3.0pl1-86

My /etc/cron.d directory contains several symlinks, along these lines:

  /etc/cron.d/foobar -> foobar.cron

The *.cron files are sometimes updated by rsync from another machine;
when that happens, their owner is temporarily set to that of a non-root
user.  The owner does get reset to root by my code, but there's a race:
it's possible for cron to notice the file change before the ownership is
fixed.  That causes cron to log a message like this:

  Apr 29 13:34:01 marmoset /usr/sbin/cron[25373]: (*system*foobar) WRONG FILE 
OWNER (/etc/cron.d/foobar)

However, cron does not notice when the ownership of the file is
corrected, causing the jobs in that file not to get executed.

Manually touching /etc/cron.d after the ownership is corrected does seem
to persuade cron to reload the file.

-- 
Aaron Crane

---------------------------------------
Received: (at 306949-done) by bugs.debian.org; 29 Apr 2005 15:46:42 +0000
>From [EMAIL PROTECTED] Fri Apr 29 08:46:42 2005
Return-path: <[EMAIL PROTECTED]>
Received: from fury.moregruel.net [64.62.190.193] 
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1DRXhS-0007Bd-00; Fri, 29 Apr 2005 08:46:42 -0700
Received: from speedy.private (206.180.155.39.adsl.hal-pc.org [206.180.155.39])
        by fury.moregruel.net (Postfix) with ESMTP id 7882A18BB2;
        Fri, 29 Apr 2005 10:46:34 -0500 (CDT)
Received: by speedy.private (Postfix, from userid 1000)
        id BE7BE1414E; Fri, 29 Apr 2005 10:46:33 -0500 (CDT)
Date: Fri, 29 Apr 2005 10:46:33 -0500
From: Steve Greenland <[EMAIL PROTECTED]>
To: Aaron Crane <[EMAIL PROTECTED]>,
        [EMAIL PROTECTED]
Subject: Re: Bug#306949: fails to reload when /etc/cron.d symlink target 
permissions change
Message-ID: <[EMAIL PROTECTED]>
Reply-To: Steve Greenland <[EMAIL PROTECTED]>
Mail-Followup-To: Steve Greenland <[EMAIL PROTECTED]>,
        Aaron Crane <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
References: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <[EMAIL PROTECTED]>
Organization: Not my strong point
User-Agent: Mutt/1.5.9i
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

On 29-Apr-05, 10:20 (CDT), Aaron Crane <[EMAIL PROTECTED]> wrote: 
>   Apr 29 13:34:01 marmoset /usr/sbin/cron[25373]: (*system*foobar) WRONG FILE 
> OWNER (/etc/cron.d/foobar)

Correct. I'm not going to follow symlinks to files not owned by root.

> However, cron does not notice when the ownership of the file is
> corrected, causing the jobs in that file not to get executed.

That's because it's monitoring the mtime of /etc/cron.d and its files,
and modifying the target of the symlink doesn't change any of those.

> Manually touching /etc/cron.d after the ownership is corrected does seem
> to persuade cron to reload the file.

Correct, see above. Touching the symlink itself would also work. Make your
script do this.

Steve

-- 
Steve Greenland
    The irony is that Bill Gates claims to be making a stable operating
    system and Linus Torvalds claims to be trying to take over the
    world.       -- seen on the net


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to