← 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

 

Jordan,

I had the same problem. After a Jaunty install, I found that
/usr/bin/mlocate belonged to the ssl-cert group, clearly incorrect!

Reading the man page for locate, I found that locate (which is symlinked
to mlocate by default) must run as a set-gid mlocate (which means the
process automatically belongs to the mlocate group on startup).

Ian Abbott's solution is therefore the "correct" one. Yours works, but
users are not supposed to belong to this group. This might create
security exposures on multi-user systems.

-- 
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 the registrant for Easy Peasy.

Status in Easy Peasy: New
Status in “mlocate” source package 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