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.
There's a daily cron job to run updatedb, mlocate.db would have been updated when the cron job ran.
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 ?
(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.
(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 :)
3 months is too long, do you have cronie-anacron installed?
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 ?
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?
Yes it ran :) Thank you very much Ahmad
OK, closing then.
Status: NEW => RESOLVEDResolution: (none) => WORKSFORME