updatedb: not always making slocate find all files.
Kernel 2.6.21.5, Slackware 12.0
Hi: Code:
bash-3.1$ cat /etc/cron.daily/slocate Code:
$ slocate foo |
Give some more info. Does "foo" always be there, or is a temporary file that could be not present the time updatedb works?
Is updatedb really executed everyday? For instance on a dc server I have that runs slack 12.0 updatedb is executed at about 4 am each day. So your system must be running at the time it is scheduled. |
Yes, foo is an old file that has been on disk (hard) for quite a lot.
I do not know what time updatedb is scheduled to run. I can say periodically the disk is scanned. I hear the noise. The period may very well be 24hs. |
Take a look at updatedb.conf (if you haven't already). Could the directory containing the file be in PRUNEPATHS list?
I haven't studied slocate that much, but I think I've read that it locates files based on user access. Maybe your user doesn't have read permission for that file? |
Quote:
an external HDD using NTFS ... Cheers, Tink |
Quote:
Code:
bash-3.1$ cat /etc/updatedb.conf And definitely, in this case, it is not a matter of access rights because, as you can see in post #1, the second invocation of slocate brings 'foo' out. Quote:
(a) Only one user account in the system besides root: semoi. Slocate run as, and manual invocation of updatedb made as root (BUT WHO IS the user executing the script /etc/cron.daily/slocate?). Code:
drwxr-xr-x 39 semoi users 16384 /xp Code:
bash-3.1# mount (c) After last automatic execution of update (cron.daily) but before manual execution (see post #1), everything in /sma got located by slocate but, as to /xp, only files in the first two levels of the /xp tree had their names printed. E.g., Code:
$ locate DIGITA Code:
bash-3.1# locate nutshell Regards and thanks for the feedback. |
AFAIK the cron job runs as the user whose crontab contains it. No matter, slocate takes the privilleges of the user that invoked it (slocate, not updatedb) and searches for files that the user has read access. But this doesn't seem to be the case... I assume the uid of semoi is 1000 ?
|
Quote:
Code:
-rwxr-xr-x 1 semoi users /xp/DIGITALES III/usb-in-a-nutshell.pdf Code:
drwxr-xr-x 39 semoi users 16384 /xp Quote:
Code:
semoi:x:1000:100::/home/semoi:/usr/bin/bash Code:
drwxr-xr-x 2 root root 2048 2003-11-04 16:20 z This having been said, the fact mentioned in post #6, point (c), about slocate only finding files in the first and second level of the /xp hierarchy, I find it very hard to understand. Ought something in my linux box, besides slocate's behavior, not be wrong? Thanks for your answer. |
All times are GMT -5. The time now is 12:24 AM. |