Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Oct 1999 13:09:52 -0400 (EDT)
From:      "Crist J. Clark" <cjc@cc942873-a.ewndsr1.nj.home.com>
To:        fran@reyes.somos.net (Francisco Reyes)
Cc:        questions@FreeBSD.ORG (FreeBSD questions)
Subject:   Re: Permission denied when rebuilding locate db
Message-ID:  <199910171709.NAA09946@cc942873-a.ewndsr1.nj.home.com>
In-Reply-To: <199910171426.KAA23720@sanson.reyes.somos.net> from Francisco Reyes at "Oct 17, 1999 10:28:51 am"

next in thread | previous in thread | raw e-mail | index | archive | help
Francisco Reyes wrote,
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> I have moved creating of the locate database to /etc/periodic/daily.
> For a month or so it worked fine but lately the locate db has been zero bytes.
> When I look at the daily run output I see:
> 
> Rebuilding locate database:
> find: .: Permission denied
> 
> If I run the script by hand as root it works fine.
> /etc/crontab has the daily jobs run as root so I don't understand how it could work if run from the shell 
> manually, but not from the daily run.

If you look at the script, you will notice that the
/usr/libexec/locate.updatedb command is actually run as 'nobody.'

> find: .: Permission denied <== Is that saying that it had the permission denied from the current, ".",  
> directory? What would be the "." directory? Neither /usr/sbin/periodic or /etc/periodic/daily/315.locate 
> (the name I renamed it to) seem to change the directory.

Well, the locate.310 script does a 'cd /', but that is not the
problem. If you look at /usr/libexec/locate.updatedb, you will see
that it also is just another shell script. And it calls,
/usr/libexec/locate.mklocatedb, yet another script. You can look
through those and possibly add some diagnostic output to see where it
is dying.

You also should search the mail archives. People have reported this
type of problem before. I can't say for sure if they got it figured
out or if you have the exact same problem, but it may be worth a
shot. 
-- 
Crist J. Clark                           cjclark@home.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910171709.NAA09946>