From owner-freebsd-questions Sun Oct 17 10: 6:48 1999 Delivered-To: freebsd-questions@freebsd.org Received: from cc942873-a.ewndsr1.nj.home.com (cc942873-a.ewndsr1.nj.home.com [24.2.89.207]) by hub.freebsd.org (Postfix) with ESMTP id B322914CA1 for ; Sun, 17 Oct 1999 10:06:44 -0700 (PDT) (envelope-from cjc@cc942873-a.ewndsr1.nj.home.com) Received: (from cjc@localhost) by cc942873-a.ewndsr1.nj.home.com (8.9.3/8.9.3) id NAA09946; Sun, 17 Oct 1999 13:09:52 -0400 (EDT) (envelope-from cjc) From: "Crist J. Clark" Message-Id: <199910171709.NAA09946@cc942873-a.ewndsr1.nj.home.com> Subject: Re: Permission denied when rebuilding locate db In-Reply-To: <199910171426.KAA23720@sanson.reyes.somos.net> from Francisco Reyes at "Oct 17, 1999 10:28:51 am" To: fran@reyes.somos.net (Francisco Reyes) Date: Sun, 17 Oct 1999 13:09:52 -0400 (EDT) Cc: questions@FreeBSD.ORG (FreeBSD questions) Reply-To: cjclark@home.com X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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