[opensuse] locate not working
locate is not working for me as non-root user. I'm not sure when exactly this started but it's fairly recent (a few days?). ~> locate xxxxxx locate: can not open `/var/lib/mlocate/mlocate.db': Permission denied I assume it's this: ~> ls -l /var/lib/mlocate/mlocate.db -rw------- 1 root root 4536577 Jul 25 12:05 /var/lib/mlocate/mlocate.db Why are there no user read rights here? Shouldn't there be? Thanks for a clue. Ralph ~> uname -a Linux xxx.xxx 3.16.7-21-desktop #1 SMP PREEMPT Tue Apr 14 07:11:37 UTC 2015 (93c1539) x86_64 x86_64 x86_64 GNU/Linux -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
* listreader <suselist@cableone.net> [07-25-15 14:04]:
locate is not working for me as non-root user. I'm not sure when exactly this started but it's fairly recent (a few days?).
~> locate xxxxxx locate: can not open `/var/lib/mlocate/mlocate.db': Permission denied
I assume it's this:
~> ls -l /var/lib/mlocate/mlocate.db -rw------- 1 root root 4536577 Jul 25 12:05 /var/lib/mlocate/mlocate.db
Why are there no user read rights here? Shouldn't there be?
and why are they owned by root? -rw-r--r-- 1 nobody nobody 11444684 Jul 25 00:15 mlocate.db -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 @ http://linuxcounter.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 2015-07-25 23:02, Patrick Shanahan wrote:
and why are they owned by root?
-rw-r--r-- 1 nobody nobody 11444684 Jul 25 00:15 mlocate.db
When it belongs to "nobody", because "nobody" created the database, then it can not contain everything: minas-tirith:~ # locate zypperlist_ust minas-tirith:~ # ls -l /root/zypperlist_ust - -rw-r--r-- 1 root root 955414 Jun 16 04:49 /root/zypperlist_ust minas-tirith:~ # l /var/lib/mlocate/mlocate.db - -rw-r--r-- 1 nobody nobody 13348614 Jul 23 04:31 /var/lib/mlocate/mlocate.db minas-tirith:~ # - -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREIAAYFAlW0EA8ACgkQja8UbcUWM1zSygD+KNcAF/pg2MFdQFmt/PGrDMW2 SNyQMXmEi9rENJUDm7UA/j701LLY3pFiUO1OzsVbbXJBsIWh6s1bcormn1qIaVqh =+SQn -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Sun, 26 Jul 2015 00:39:11 +0200 "Carlos E. R." <robin.listas@telefonica.net> wrote:
-rw-r--r-- 1 nobody nobody 11444684 Jul 25 00:15 mlocate.db
When it belongs to "nobody", because "nobody" created the database, then it can not contain everything:
Thanks for the memory-kick, Patrick and Carlos. Yes, I had run updatedb with sudo because I was looking for a file that wasn't in the db. It wasn't in the db because user nobody had no rights to it. Re-running updatedb as nobody ('sudo su nobody') returned the db to normal 'nobody' ownership and restored the user read rights. The same repair would have happened if / when the regular overnight cron job for updatedb had run. Sorry for the noise. Ralph -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Carlos E. R.
-
listreader
-
Patrick Shanahan