Bug 2361 - mlocate.db empty and not accessible by simple users
Summary: mlocate.db empty and not accessible by simple users
Status: RESOLVED WORKSFORME
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-02 12:04 CEST by Claire Revillet
Modified: 2011-08-03 18:15 CEST (History)
0 users

See Also:
Source RPM:
CVE:
Status comment:


Attachments

Description Claire Revillet 2011-08-02 12:04:14 CEST
Description of problem:
After installation, mlocate.db is empty and simple user have this message when trying to use locate:
locate: impossible d'ouvrir « /var/lib/mlocate/mlocate.db »: Permission non accordée
(En: impossible to open <<...>>: permission denied)


It's working after doing :
sudo updatedb

But It's not easy to find for a lamda user of Mageia and I never have to do anything under other distro.
Comment 1 Ahmad Samir 2011-08-02 13:09:56 CEST
There's a daily cron job to run updatedb, mlocate.db would have been updated when the cron job ran.
Comment 2 Claire Revillet 2011-08-02 13:46:26 CEST
At which hour did this cron run ?
We can't expect that every user keep every computer on 24h/24.
Can't we update the db after every urpmi/urpme ?
Comment 3 Ahmad Samir 2011-08-02 14:02:37 CEST
(In reply to comment #2)
> At which hour did this cron run ?

4:01 AM

> We can't expect that every user keep every computer on 24h/24.

That's where cronie-anacron is useful, you don't have to have your box running 24/7 for the cron jobs to be run.

> Can't we update the db after every urpmi/urpme ?
No, because it's resources consuming to update the db; and you can install a package now, then another 10 min. later, then another 2 hours later... etc.
Comment 4 Claire Revillet 2011-08-02 14:08:37 CEST
(In reply to comment #3)
> (In reply to comment #2)
> > At which hour did this cron run ?
> 
> 4:01 AM
> 
> > We can't expect that every user keep every computer on 24h/24.
> 
> That's where cronie-anacron is useful, you don't have to have your box running
> 24/7 for the cron jobs to be run.
Well after 3 months the db had never been updated

> > Can't we update the db after every urpmi/urpme ?
> No, because it's resources consuming to update the db; and you can install a
> package now, then another 10 min. later, then another 2 hours later... etc.
you are true :)
Comment 5 Ahmad Samir 2011-08-02 14:43:33 CEST
3 months is too long, do you have cronie-anacron installed?
Comment 6 Claire Revillet 2011-08-02 15:03:11 CEST
no, I had not.
I installed it, read the man page, understand what it will do,
but I don't understand if it will be lanched automatically at wake up or not ?
Comment 7 Ahmad Samir 2011-08-02 16:56:16 CEST
From the manpage:
For each job, Anacron checks whether this job has been executed in the last n days, where n is the time period specified for that job. If a job has not been executed in n days or more, Anacron runs the job's shell command, after waiting for the number of minutes specified as the delay parameter.

so ideally 5 minutes or so after installing anacron, the updatedb cron should be run along with the other cron jobs. Did it run already?
Comment 8 Claire Revillet 2011-08-03 09:52:13 CEST
Yes it ran :)
Thank you very much Ahmad
Comment 9 Ahmad Samir 2011-08-03 18:15:59 CEST
OK, closing then.

Status: NEW => RESOLVED
Resolution: (none) => WORKSFORME


Note You need to log in before you can comment on or make changes to this bug.