FIX INCLUDED: anacron does not work in default config on always-on computers

Bug #118004 reported by Christian Gunning
4
Affects Status Importance Assigned to Milestone
anacron (Ubuntu)
Invalid
Undecided
Kees Cook

Bug Description

Default config uses both cron and anacron. Cron processes scripts in cron.hourly, while anacron processes the rest.

Problem is that anacron isn't a deamon. In ubuntu, it's started at boot, it checks if there's anything to do, and then exits.
For machines that regularly reboot this works, but for servers, anacron never restarts unless asked. ps -aux verifies this I encountered this on Feisty Server, and others describe the issue in detail here:

http://ubuntuforums.org/showthread.php?t=286480

THE FIX: add a script to cron.hourly so that cron starts anacron to check if there's anything to do.

#!/bin/sh
/usr/sbin/anacron -s

Revision history for this message
Christian Gunning (helmingstay) wrote :

Not sure if -s is necessary or proper.

Also, this shouldn't affect machine without anacron installed. It seems to affect always-on machines with anacron installed by default (Desktop particularly) .

Revision history for this message
Kees Cook (kees) wrote :

Thanks for taking the time to report this bug and helping to make Ubuntu better. I have unmarked it as a security issue since this bug does not show evidence of allowing attackers to cross privilege boundaries nor directly cause loss of data/privacy.

Should the title of this bug be "anacron-controlled crons not running"? I am not able to reproduce the issue as described (e.g. my cron.daily is clearly running, slocate has been updated and has today's date: "sudo ls -la /var/lib/slocate/slocate.db")

Revision history for this message
Christian Gunning (helmingstay) wrote : Re: [Bug 118004] Re: FIX INCLUDED: anacron does not work in default config on always-on computers

Yes, the title change seems appropriate:

"anacron-controlled crons not running on always-on machines"

  I may have misdiagnosed my own problems - the cited thread is the
only documentation i've so far found explaining ubuntu's relationship
be cron, anacron, and cron.daily.

> Should the title of this bug be "anacron-controlled crons not running"?
> I am not able to reproduce the issue as described (e.g. my cron.daily is
> clearly running, slocate has been updated and has today's date: "sudo ls
> -la /var/lib/slocate/slocate.db")
>
>
> ** Changed in: anacron (Ubuntu)
> Sourcepackagename: None => anacron
> Assignee: (unassigned) => Kees Cook
> Status: Unconfirmed => Needs Info
>
> ** This bug is no longer flagged as a security issue
>
> --
> FIX INCLUDED: anacron does not work in default config on always-on computers
> https://bugs.launchpad.net/bugs/118004
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Far better an approximate answer to the right question, which is often
vague, than the exact answer to the wrong question, which can always
be made precise -- j.w. tukey

Revision history for this message
Noah Kantrowitz (noah+launchpad) wrote :

Having looked through anacron_2.3-13ubuntu2_i386.deb, there are scripts in it to call anacron from cron (/etc/cron.d/anacron), however these are not installed correctly on my system.

Revision history for this message
Kees Cook (kees) wrote :

Please try doing:

  sudo apt-get install --reinstall anacron

I'm closing this bug, as it does not appear to be a problem specific to the anacron packaging itself. Please feel free to report any other bugs you might find.

Changed in anacron:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.