← Back to team overview

ubuntu-eee-coders team mailing list archive

[Bug 281471] Re: Unable to use 'locate' to locate files mlocate.db permission denied

 

I have this problem with locate but not with ping or crontab.
I don't want to set set the s bit because locate is supposed to only show users the location of files they have permission to see.

The problem on my system seems to be that /var/lib/mlocate/mlocate.db is unreadable by others. If I chmod o+r then it works.
However after running updatedb as root the permissions are reset back to -rw-r-----
-rw-r----- 1 root mlocate 9204983 2008-11-20 20:15 /var/lib/mlocate/mlocate.db

I was wondering if there may be a reason for
/var/lib/mlocate/mlocate.db to be unreadable by others because although
it has a lot of binary bits (I presume that's what the highlighted "^@"
are) there is also a lot of human readable text that could potentially
be a security risk.

Does anyone know what this file's permissions are supposed to be? Say on
an install where it has always worked?

** Also affects: ubuntu
   Importance: Undecided
       Status: New

-- 
Unable to use 'locate' to locate files mlocate.db permission denied
https://bugs.launchpad.net/bugs/281471
You received this bug notification because you are a member of Ubuntu
Eee Coders, which is subscribed to Ubuntu Eee.

Status in Ubuntu Eee: New
Status in Ubuntu: New

Bug description:
I'm using Hardy on a 1000h. When I'm trying to locate a file using locate I receive
$ locate gdm
locate: can not open `/var/lib/mlocate/mlocate.db': Permission denied

I listed /var/lib/locate and mlocate.db seems to be owned by root and group mlocate
$ ls -al /var/lib/mlocate
total 3204
drwxr-xr-x  2 root root       4096 2008-10-11 00:33 .
drwxr-xr-x 51 root root       4096 2008-10-06 21:01 ..
-rw-r-----  1 root mlocate 3266135 2008-10-11 00:33 mlocate.db



References