On Sun, Dec 28, 2008 at 2:54 PM, Dave K <davek08...@gmail.com> wrote:
> I've been seeing this on a 4.3 box.  After reading your email, and
> seeing that I'm not the only one with the issue, I've been playing
> with it today.

When this happened to me I eventually tracked it down to not having
enough room in /var/tmp, as that's where the weekly script has
locate.updatedb places its files by default.  The solution was to
redirect it to another directory that I knew would have enough space
by creating /etc/weekly.local with this line:
    export TMPDIR=/data/tmp

The original poster said his /tmp has plenty of space, so he should try it with
    export TMPDIR=/tmp


...
> If I run it manually (as root, "sh /etc/weekly"), it fails with the
> find in locate.updatedb giving the error "find: .:: Permission
> denied".

That's not how cron runs it.  Cron runs it from /var/log and not
~root.  See that "HOME=/var/log" line near the top of the root
crontab?  It actually chdirs there when invoking the cron jobs.


>  If I cd into /tmp first, it runs okay.  So I added
> "PREVPWD=$PWD; cd /tmp" in /etc/weekly before the call to
> locate.updatedb, and "cd $PREVPWD: after.
>
> It now has run successfully both when invoked manually, and from cron.

Weird.  Unless your /var/log isn't accessible by 'nobody', that should
have had no effect.

Did you have TMPDIR set in your environment when you ran it manually?
How confident are you that it actually ran to completion from cron?


Philip Guenther

Reply via email to