/var/lib/mlocate/mlocate.db perms

Frantisek Hanzlik franta at hanzlici.cz
Sun May 3 23:40:47 UTC 2015


Ed Greshko wrote:
> On 05/04/15 07:14, jd1008 wrote:
>> As unprivileged user, I run locate <filename>
>> and get
>> $ locate file_3.mp3
>> locate: can not open `/var/lib/mlocate/mlocate.db': Permission denied
>>
>> I always end up running sudo to change the perms so unpriv'ed
>> users can run locate.
>>
>> What command should I run so the mlocate.db file is readable
>> by unpriv'ed users?
>>
> 
> The "better" question is, does this match your system?
> 
> [egreshko at meimei ~]$ ll /bin/locate
> -rwx--s--x. 1 root slocate 40528 Aug 18  2014 /bin/locate

Exactly. And mlocate DB itself should meet perms:

# ll -a /var/lib/mlocate/
total 226700
drwxr-x---.   2 root slocate      4096 May  3 03:54 .
drwxr-xr-x. 100 root root         4096 Jan 12 02:35 ..
-rw-r-----.   1 root slocate 232126554 May  3 03:54 mlocate.db




More information about the users mailing list