|
|
#1 |
|
All Star
Join Date: Mar 2002
Location: Anchorage, AK
Posts: 762
|
I am not sure when this started happening, but I am no longer able to use locate (or 'which' for that matter).
When I run the binary directly, I get this: derekhed$ ./locate.updatedb ./locate.updatedb: line 89: /var/db/locate.database: Permission denied The code around line 89 is: Code:
then
case X"`$find $tmp -size -257c -print`" in
X) cat $tmp > $FCODES;;
*) echo "updatedb: locate database $tmp is empty"
exit 1
esac
fi
Thanks!
__________________
...if only you could see what I've seen with your eyes. - Batty, Blade Runner They all float down here... |
|
|
|
|
|
#2 |
|
Triple-A Player
Join Date: Jan 2002
Posts: 158
|
Somehow your username no longer has access to the locate database. Please provide the output of:
Code:
ls -l /var/db/locate.database |
|
|
|
|
|
#3 |
|
All Star
Join Date: Mar 2002
Location: Anchorage, AK
Posts: 762
|
Thanks for replying.
derekhed$ ls -l /var/db/locate.database -r--r--r-- 1 nobody wheel 256 Apr 3 16:00 /var/db/locate.database derekhed$ groups derekhed appserveradm appserverusr admin So it looks like I am not a member of the 'wheel' group, but I am not sure what user is actually running the weekly cron job that rebuilds the locatedb anyway... I am using XJanitor as this is a laptop. I have an entry in: /var/cron/tabs/root That looks like this: */15 * * * * /Users/derekhed/scripts/XJanitor.pl Three questions: 1. Why can't I run this myself from the Terminal? 2. Why isn't it being run from the weekly cron task? 3. Is XJanitor messing things up somehow?
__________________
...if only you could see what I've seen with your eyes. - Batty, Blade Runner They all float down here... |
|
|
|
|
|
#4 | |||||||||||||||||||||||
|
Prospect
Join Date: Jun 2004
Posts: 21
|
hi derekhed, if you look at the periodic weekly code at: /etc/periodic/weekly/310.locate you'll see that the locate.updatedb facility is run as user nobody (su -fm nobody) so, try: Code:
$ sudo periodic weekly |
|||||||||||||||||||||||
|
|
|
|
|
#5 |
|
All Star
Join Date: Mar 2002
Location: Anchorage, AK
Posts: 762
|
Running the periodic command worked, thanks.
Still not sure why XJanitor isn't getting the job done, but the latest thing I can google on it is from 2003...
__________________
...if only you could see what I've seen with your eyes. - Batty, Blade Runner They all float down here... |
|
|
|
|
|
#6 | |||||||||||||||||||||||
|
Hall of Famer
Join Date: Apr 2002
Posts: 3,315
|
So? There is a third "r" there, allowing *anyone* to read it. [Hmm... someone posted a wheel-related 'hint' this week.] Anyway, 256 bytes is too small. That weekly task hasn't run properly yet. Here's mine: Code:
ls -lh /var/db/locate.database -r--r--r-- 1 nobody wheel 7.8M Apr 5 03:19 /var/db/locate.database write privs when it runs (and turns them off when it's done). Anyway -- as I guess you learned -- we mortal users were never meant to run /usr/libexec/locate.updatedb directly. [though... it mighta worked if you hadda used sudo.] -HI- |
|||||||||||||||||||||||
|
|
|
![]() |
|
|