|
|
|
|
||||||
| linux.debian.user debian-user@lists.debian.org. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hello. Today I found a very strange problem. Some files seem to be
missing from locatedb database. It all started with one particular file I wanted to find. But 'locate <word>' didn't find the file I was looking for. I went to the directory it was supposed to be, and there it was! I have a cron job to updatedb every night. In fact: $ ls -l /var/cache/locate/ total 7020 -rw-r--r-- 1 root root 7173582 2007-09-27 06:26 locatedb So it seems to be in order. The file I wanted was created in August. So? In fact, none the files in this directory is in the database! In case you're curious, the directory is named ~/textos/fisica/departamento_fisica/departamento In /etc/updatedb.conf, there is the following line: PRUNEPATHS="/tmp /usr/tmp /var/tmp /afs /amd /alex /var/spool /sfs /media" So I don't think updatedb should omit this directory. In fact, none of the files in any subdirectory of ~/textos/fisica/departamento_fisica/ is indexed! I've made some random search of files in other directories, and they seem indexed. In fact files in ~/textos itself are indexed. Some files in the original problematic directory have permissions -rw------- (does updatedb respect this), but the file I was looking for in the first place has read permissions for all. I don't understand. Does any? Regards, Victor -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 Victor Munoz wrote: > Hello. Today I found a very strange problem. Some files seem to be > missing from locatedb database. [snip] > I don't understand. Does any? Try running 'updatedb' as root manually and check if this s. Johannes -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFG+/USC1NzPRl9qEURAkN3AJ9pDW/DYuwggs803MvgiI9/uDv/wwCfXxEL 1eCAPBxlTPzeZ4WQvEwT2pI= =RoV2 -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 On 09/27/07 12:38, Victor Munoz wrote: > Hello. Today I found a very strange problem. Some files seem to be > missing from locatedb database. > > It all started with one particular file I wanted to find. But 'locate > <word>' didn't find the file I was looking for. I went to the > directory it was supposed to be, and there it was! > > I have a cron job to updatedb every night. In fact: > > $ ls -l /var/cache/locate/ > total 7020 > -rw-r--r-- 1 root root 7173582 2007-09-27 06:26 locatedb > > So it seems to be in order. The file I wanted was created in August. So? > > In fact, none the files in this directory is in the database! > > In case you're curious, the directory is named > > ~/textos/fisica/departamento_fisica/departamento > > In /etc/updatedb.conf, there is the following line: > > PRUNEPATHS="/tmp /usr/tmp /var/tmp /afs /amd /alex /var/spool /sfs /media" > > So I don't think updatedb should omit this directory. In fact, none of > the files in any subdirectory of ~/textos/fisica/departamento_fisica/ > is indexed! > > I've made some random search of files in other directories, and they > seem indexed. In fact files in ~/textos itself are indexed. > > Some files in the original problematic directory have permissions > -rw------- (does updatedb respect this), but the file I was looking > for in the first place has read permissions for all. > > I don't understand. Does any? When were these files created? - -- Ron Johnson, Jr. Jefferson LA USA Give a man a fish, and he eats for a day. Hit him with a fish, and he goes away for good! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFG+/nCS9HxQb37XmcRAqp0AKCjY7VDWXovc/lUiWeiTKFRp2iJvwCePucv wleP/20aTOv5HzhdVisMDpw= =TOSw -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On Thu, Sep 27, 2007 at 01:43:14PM -0500, Ron Johnson wrote:
> > > > Some files in the original problematic directory have permissions > > -rw------- (does updatedb respect this), but the file I was looking > > for in the first place has read permissions for all. > > > > I don't understand. Does any? > > When were these files created? > There are 7 files with -rw------- permission, last modification times between 2003-10-16 and 2007-06-11, and 9 files with -rw-r--r-- permissions, last modification times between 2007-05-02 and 2007-08-29. Anyway, other directories which don't seem to be indexed either have files with timestamps in various ranges, I don't see any correlation. Victor -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On Thu, Sep 27, 2007 at 03:21:32PM -0400, Victor Munoz wrote:
> On Thu, Sep 27, 2007 at 01:43:14PM -0500, Ron Johnson wrote: > > > > > > Some files in the original problematic directory have permissions > > > -rw------- (does updatedb respect this), but the file I was looking > > > for in the first place has read permissions for all. > > > > > > I don't understand. Does any? > > > > When were these files created? > > > > There are 7 files with -rw------- permission, last modification times > between 2003-10-16 and 2007-06-11, and 9 files with -rw-r--r-- > permissions, last modification times between 2007-05-02 and 2007-08-29. > Anyway, other directories which don't seem to be indexed either have > files with timestamps in various ranges, I don't see any correlation. what are the permissions on the parent directories? that might be more relevant. A -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFG/APzaIeIEqwil4YRAnf7AKDjxUJZax/Dguoofa1iN8wHgHGIhwCgvvjR +66uJvnTnz1DzjwBRULAAi0= =eMxl -----END PGP SIGNATURE----- |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
On Thu, Sep 27, 2007 at 12:26:43PM -0700, Andrew Sackville-West wrote:
> > what are the permissions on the parent directories? that might be more > relevant. > drwxr-xr-x in all cases. Victor -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
On 09/27/2007 02:21 PM, Victor Munoz wrote:
> On Thu, Sep 27, 2007 at 01:43:14PM -0500, Ron Johnson wrote: >>> Some files in the original problematic directory have permissions >>> -rw------- (does updatedb respect this), but the file I was looking >>> for in the first place has read permissions for all. >>> >>> I don't understand. Does any? >> When were these files created? >> > > There are 7 files with -rw------- permission, last modification times > between 2003-10-16 and 2007-06-11, and 9 files with -rw-r--r-- > permissions, last modification times between 2007-05-02 and 2007-08-29. > Anyway, other directories which don't seem to be indexed either have > files with timestamps in various ranges, I don't see any correlation. > > Victor > > Check /etc/updatedb.conf and the LOCALUSER variable. LOCALUSER is set to 'nobody' by default, and 'nobody' has no ability to view directories with -rwx------ permissions. -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
On Thu, Sep 27, 2007 at 03:31:23PM -0400, Victor Munoz wrote:
> On Thu, Sep 27, 2007 at 12:26:43PM -0700, Andrew Sackville-West wrote: > > > > what are the permissions on the parent directories? that might be more > > relevant. > > > > drwxr-xr-x in all cases. > Wrong. One had permissions drwxr-xr-- as I mention in other post, and that's why it failed. Thanks, Victor -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#9 |
|
Messages: n/a
Hébergeur: |
On Thu, Sep 27, 2007 at 08:23:14PM +0200, Johannes Wiedersich wrote:
> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Victor Munoz wrote: > > Hello. Today I found a very strange problem. Some files seem to be > > missing from locatedb database. > > [snip] > > > I don't understand. Does any? > > Try running 'updatedb' as root manually and check if this s. > It worked. All missing files are there now. At first, this was a mystery, but now I understand why. updatedb is not run as root, but as 'nobody', as set in /etc/updatedb.conf, so the sequence $ . /etc/updatedb.conf; updatedb yields a lot of "Permission denied" messages, unlike "$ updatedb". And I was wrong when I replied to another post in this thread, saying that all directories had permissions drwxr-xr-x. ~/textos/fisica had drwxr-xr--, and that was it. So it's all working now, and much better, I understand :-) Thanks for the . Victor -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#10 |
|
Messages: n/a
Hébergeur: |
On Thu, Sep 27, 2007 at 03:31:23PM -0400, Victor Munoz wrote:
> On Thu, Sep 27, 2007 at 12:26:43PM -0700, Andrew Sackville-West wrote: > > > > what are the permissions on the parent directories? that might be more > > relevant. > > > > drwxr-xr-x in all cases. > are these directories nfs mounts by any chance? that's all I can think of, as they are excluded by default. A -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFG/AypaIeIEqwil4YRAkqDAKDG7Ix3nS4vu6BjLVafjsUN8pnbagC fYw/e F3did549+7LWjahVGCuQRkk= =sPRO -----END PGP SIGNATURE----- |
|
|
|
#11 |
|
Messages: n/a
Hébergeur: |
On Thu, Sep 27, 2007 at 02:53:18PM -0500, Mumia W.. wrote:
> > Check /etc/updatedb.conf and the LOCALUSER variable. LOCALUSER is set to > 'nobody' by default, and 'nobody' has no ability to view directories > with -rwx------ permissions. > That was the problem, indeed. Thanks, Victor -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#12 |
|
Messages: n/a
Hébergeur: |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 Victor Munoz wrote: > It worked. All missing files are there now. > > At first, this was a mystery, but now I understand why. updatedb is > not run as root, but as 'nobody', as set in /etc/updatedb.conf, so > the sequence > > $ . /etc/updatedb.conf; updatedb > > yields a lot of "Permission denied" messages, unlike "$ updatedb". > > And I was wrong when I replied to another post in this thread, saying > that all directories had permissions drwxr-xr-x. ~/textos/fisica had > drwxr-xr--, and that was it. > > So it's all working now, and much better, I understand :-) Thanks for > the . I use package 'slocate' instead of 'locate': /----------- $ aptitude show slocate Package: slocate [snip] Description: Secure replacement of findutil's locate This locate can index all files on your system, but only files and directories which the invoking user has access to will be displayed. Note: If your computer is not up 24/7 you should consider installing anacron since the database is only updated once a night. \----------- Usage is like for locate, ie. I type locate, but it will execute slocate. HTH, Johannes -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFG/KQjC1NzPRl9qEURAmNNAJ994vsY6IKqt5BFQtHVjs0Mp4+gUAC fTCEk BWaMziTDCLv4q9cxMNuP4Us= =9tLN -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
![]() |
| Outils de la discussion | |
|
|