From owner-freebsd-questions Sat Jun 5 1:59:43 1999 Delivered-To: freebsd-questions@freebsd.org Received: from chippie.cgu.nl (chippie.cgu.nl [145.101.220.7]) by hub.freebsd.org (Postfix) with ESMTP id 41CCD15027 for ; Sat, 5 Jun 1999 01:59:40 -0700 (PDT) (envelope-from psd@cgu.nl) Received: from localhost (psd@localhost) by chippie.cgu.nl (8.9.3/8.9.3/psd) with SMTP id KAA09311; Sat, 5 Jun 1999 10:59:34 +0200 (CEST) Date: Sat, 5 Jun 1999 10:59:33 +0200 (CEST) From: Paul Dekkers X-Sender: psd@chippie.cgu Reply-To: Paul Dekkers To: cjclark@home.com Cc: ChrisMic@clientlogic.com, questions@FreeBSD.ORG Subject: Re: Problems with locate database... In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 2 Jun 1999, Paul Dekkers wrote: | On Tue, 1 Jun 1999, Crist J. Clark wrote: | | | > | Check the /etc/crontab entry. Is the weekly periodic script being run as | | > | root? | | > | | > It is. However in /etc/periodic/weekly/310.locate the locate-db command is | | > run as nobody. It doesn't work when run in crontab, but works when run | | > from commandline as root. Strange, isn't it? Same enviroment I assume. | | | | Not at all strange. If you once built the database as root, I bet | | /var/db/locate.database is owned by root, no? nobody does not have | | -r--r--r-- 1 nobody wheel 256 May 29 03:30 /var/db/locate.database | (It's an empty file now btw... and on a box where this all works (never | ran /usr/libexec/locate.updatedb directly) the file has the same | permissions...) In my weekly cron-output I now see the following: Rebuilding locate database: find: .: Permission denied How is that possible when running as root? Can't the user nobody chdir to the current directory when the script runs? (Which one is that? Root's homedir?) Paul -- Paul Dekkers E-Mail: To err is human, to moo bovine To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message