Date: Sat, 3 Jul 1999 08:39:41 -0700 From: "Justin Wolf" <jjwolf@bleeding.com> To: <freebsd-questions@freebsd.org> Subject: weekly locate rebuild Message-ID: <NDBBLEBGOLOIGCNOJACFCEGNCAAA.jjwolf@bleeding.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?NDBBLEBGOLOIGCNOJACFCEGNCAAA.jjwolf>
