On 2024-11-27 09:34, David C. Rankin wrote:
On 11/26/24 7:57 AM, Pit Suetterlin via openSUSE Users wrote:
David C. Rankin wrote:
All,
I don't have to search for squirreled away files too often, but when I do, I rely on plocate (mlocate successor). However, tonight I was surprised it had not indexed by Readme-doxygen.txt and I can't figure out why.
Does it find any files in your home directory? What is the permission of your home directory (or the parent directories of the file)? As what user is plocate running (/etc/sysconfig/locate)?
I think you hit the nail on the head, but I'm not sure how to configure this? No files in my $HOME are indexed. The problem appears to be whoever plocate runs as, they do not have permission in my home directory:
drwx------ 48 david david 4096 Nov 26 23:47 .
In TW (and I presume in Leap), config is controlled by /etc/ updatedb.conf and the default does not specify and user:group it is running as (I always just presumed root, mlocate never had an issue). Maybe this is part of the "more secure" plocate features.
Looking at the systemd service file, it looks like it runs as a specific user with root group:
ExecStart=/bin/sh -c \ "chown -R ${RUN_UPDATEDB_AS}:root /var/lib/plocate && \ su --shell=/bin/sh ${RUN_UPDATEDB_AS} -c 'umask 0022; /usr/ sbin/updatedb'"
Variable "RUN_UPDATEDB_AS" is probably defined in file /etc/sysconfig/locate. RUN_UPDATEDB_AS="root" #RUN_UPDATEDB_AS="nobody"
Since my home has no group-read, the plocate user can't read it and there is no group read for root to read. I'll change perms to 0750 on my home and I bet it works. Will confirm after update.
-- Cheers / Saludos, Carlos E. R. (from 15.5 x86_64 at Telcontar)