From owner-freebsd-questions Sat Jul 3 8:51:43 1999 Delivered-To: freebsd-questions@freebsd.org Received: from vital.bleeding.com (vital.bleeding.com [206.251.12.170]) by hub.freebsd.org (Postfix) with ESMTP id 98B7214D64 for ; Sat, 3 Jul 1999 08:51:39 -0700 (PDT) (envelope-from jjwolf@bleeding.com) Received: from crimson (crimson [144.254.195.6]) by vital.bleeding.com (8.9.2/8.9.2) with SMTP id IAA42193 for ; Sat, 3 Jul 1999 08:51:39 -0700 (PDT) (envelope-from jjwolf@bleeding.com) From: "Justin Wolf" To: Subject: weekly locate rebuild Date: Sat, 3 Jul 1999 08:39:41 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Importance: Normal Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This is a lame question, but... when my machine tries to automagically rebuild the locate db, it fails. I modified the 310.locate script in /etc/periodic/weekly as such: if [ -x /usr/libexec/locate.updatedb -a -f $locdb ] ; then echo "" echo "Rebuilding locate database:" echo "touching... " touch ${locdb}; echo "chowning... " chown nobody ${locdb}; echo "chmoding... " chmod 644 ${locdb} echo "running... " echo /usr/libexec/locate.updatedb | nice -5 su -fm nobody echo "last chmod... " chmod 444 ${locdb} echo "done" fi And I get this output: Rebuilding locate database: touching... chowning... chmoding... running... find: .: Permission denied 0 last chmod... done When I run it manually via 'periodic weekly' it works fine with no errors (as root). Does the root crontab not run as root? Any suggestions? -Justin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message