[Koha-devel] Koha on Ubuntu LTS

Chris Cormack chris at bigballofwax.co.nz
Mon Jul 30 00:59:21 CEST 2012


On 30 July 2012 10:51, Paul <paul.a at aandc.org> wrote:
> At 07:51 AM 7/30/2012 +1200, Chris Cormack wrote:
>>
>> If you look carefully you will note that it is cron not Koha trying to use
>> the mta. Which you don't have (or haven't configured)
>>
>> This is a much lower level OS thing, looks like you have mucked up your
>> cron set up. Note not the koha cron jobs, but cron itself.
>>
>> You will want to fix that.
>
>
> Thanks for the reply.  OK - so I (wrongly?) bypassed crontab when I found
> that Ubuntu|Koha|me had created 'root' in /var/spool/cron/crontabs.
>
> The reason I'me in some doubt about whether it was Koha or me that
> originally created the file, is that this is the only line that started with
> '*/5 * *' (the Koha default from all documents that I've seen) and that I
> always use '5 * *' (or whatever value I want - one minute for Zebra from
> experience on our production server.)
>
> Also, user koha is not in the sudoers file, so cannot use crontab -e.  Maybe
> Makefile.PL (or one of the other scripts that it calls) put it there during
> the time that Makefile was running as user paul (root privileges)?

That's untrue, any user can use crontab -e

http://linux.die.net/man/1/crontab

Unless you have a cron.deny (or cron.allow), blocking it
>
> If I use crontab -e (just tried it), vi writes to a
> "/tmp/crontab.gCZpqN/crontab" which Ubuntu then moves to
> /var/spool/cron/crontabs/root -- not to /etc/cron.d or anywhere else.

No it will most definitely not move it to /etc/cron.d

>
> I checked our production server (Ubuntu 11.10, Koha 3.6.1) and found exactly
> the same set up in /var/spool/cron/crontabs/root:
>
>         # Env Vars Necessary for running KOHA related Cron jobs
>         PERL5LIB = /usr/share/koha/lib
>         KOHA_CONF = /etc/koha/koha-conf.xml
>         KOHA_CRON_PATH = /usr/share/koha/bin/cronjobs
>
>         # ** KOHA **
>         # ZEBRA INDEX UPDATES incremental index updates throughout
>         # the day for both authorities and bibs : -z means incremental
>         # Checking for new/deleted records every: 1 MINUTE
>         1 * * * *  perl -I $PERL5LIB
> $KOHA_CRON_PATH/../migration_tools/rebuild_zebra.pl -b -a -z >/dev/null 2>&1
>         #nightly
>         0 0 * * * perl -I $PERL5LIB
> $KOHA_CRON_PATH/../migration_tools/merge_authority.pl -n -b >/dev/null 2>&1
>         # is this a duplicate cron job? see
> /usr/share/koha/bin/cronjobs/crontab
>         # This is my sanity check
>         # * * * * *  date > ~/date.txt
>
Note from the manpage

Crontab is the program used to install, remove or list the tables used
to drive the cron(8) daemon. Each user can have their own crontab, and
though these are files in /var/spool/ , they are not intended to be
edited directly. For SELinux in mls mode can be even more crontabs -
for each range. For more see selinux(8).

Chris


More information about the Koha-devel mailing list