`locate` not working on Home directory since snapshot 20260213-0

Hello,

As the title says, locate is not locating files in my Home directory. Works fine outside of $HOME.

Some probably useless information.

:~> namei -l /var/lib/plocate/plocate.db 
f: /var/lib/plocate/plocate.db
drwxr-xr-x root root /
drwxr-xr-x root root var
drwxr-xr-x root root lib
drwxr-xr-x root root plocate
-rw-r--r-- root root plocate.db
# /etc/updatedb.conf: config file for plocate

# This file sets variables that are used by updatedb.
# For more info, see the updatedb.conf(5) manpage.

# Filesystems that are pruned from updatedb database
PRUNEFS="9p afs anon_inodefs auto autofs bdev binfmt binfmt_misc ceph fuse.ceph cgroup cifs coda configfs cramfs cpuset debugfs devfs devpts devtmps ecryptfs eventpollfs exofs futexfs ftpfs fuse fusectl gfs gfs2 gpfs hostfs hugetlbfs inotifyfs iso9660 jffs2 lustre misc mqueue ncpfs nfs NFS nfs4 nfsd nnpfs ocfs ocfs2 pipefs proc ramfs rpc_pipefs securityfs selinuxfs sfs shfs smbfs sockfs spufs sshfs subfs supermount sysfs tmpfs ubifs udf usbfs vboxsf vperfctrfs"

# Paths which are pruned from updatedb database
PRUNEPATHS="/tmp /var/tmp /var/cache /var/lock /var/run /var/spool /mnt /cdrom /usr/tmp /proc /media /sys /.snapshots /var/run/media"

# Folder names that are pruned from updatedb database
PRUNENAMES=".git .hg .svn .bzr .arch-ids {arch} CVS"

# Skip bind mounts
# DISABLED for bnc#994663 (probably still valid for plocate?)
# and to avoid btrfs subvolume issues
PRUNE_BIND_MOUNTS="no"

Any ideas? Thanks for reading.

FYI: catfish, which uses the plocate.db, works as expected.

I also tested locate on my laptop and it doesn’t work there either. I’ll submit a bug report.

I am not having a problem with locate finding items in /home on tumbleweed,

(base) tom@mydesktop: ~ $ locate .bashrc
/etc/bash.bashrc
/home/tom/.bashrc
/home/tom/.bashrc.backup.20260115
/home/tom/.bashrc.backup.20260331
/home/tom/.local/share/Steam/ubuntu12_64/steam-runtime-sniper/sniper_platform_0.20240618.92328/files/etc/bash.bashrc
/home/tom/.local/share/Steam/ubuntu12_64/steam-runtime-sniper/sniper_platform_0.20240618.92328/files/share/base-files/dot.bashrc
/home/tom/Cfd/SALOME-9.13.0/BINARIES-CO7/KERNEL/bin/salome/appliskel/.bashrc
/home/tom/Cfd/SALOME-9.13.0/BINARIES-CO7/SALOME/.bashrc
/home/tom/Cfd/SALOME-9.13.0/BINARIES-CO7/SALOMEBOOTSTRAP/__RUN_SALOME__/.bashrc
/home/tom/Cfd/SALOME-9.13.0/BINARIES-CO7/URANIE/uranie.bashrc
/usr/etc/bash.bashrc
/usr/etc/skel/.bashrc

Try updating your db. I had to go to update command below because of “nobody” ownership issue that I don’t undersand.

sudo systemctl start plocate-updatedb

On one of my machines with Apparmor I have the same result as you provided I don’t glob. Can you glob with accurate results? Are you using SELinux?

With SELinux my results are:

:~> locate .bashrc
/etc/bash.bashrc
/usr/etc/bash.bashrc
/usr/etc/skel/.bashrc

No issues locating files on the main file system.

My database updates everyday (I also did it manually).

I tested my Apparmor machine and I can glob successfully. Mush be an SELinux thing.

Results from home directory (notice the period):

:~> ls -l
total 0
drwxr-xr-x. 1 ben ben 116 Apr 13 11:41 bin
drwxr-xr-x. 1 ben ben   0 Apr 20 11:51 Desktop
drwxr-xr-x. 1 ben ben 636 Apr 20 11:54 Documents
drwxr-xr-x. 1 ben ben  16 Apr 22 00:04 Downloads
drwxr-xr-x. 1 ben ben   0 Feb 24  2024 Music
drwxr-xr-x. 1 ben ben 454 Apr  4 12:47 Pictures
drwxr-xr-x. 1 ben ben   0 Feb 24  2024 Public
drwxr-xr-x. 1 ben ben   0 Feb 24  2024 Templates
drwxr-xr-x. 1 ben ben  16 Apr 13 11:36 Videos

I have apparmor running but I have never done anything to configure it. Apparmor gives the active profiles as below:

base) tom@mydesktop: ~ $ sudo apparmor_status
apparmor module is loaded.
169 profiles are loaded.
88 profiles are in enforce mode.
   /usr/bin/lessopen.sh
   **/usr/bin/{p,}locate**
   /usr/lib/colord
   /usr/{bin,sbin}/updatedb
   apache2
   apache2//DEFAULT_URI
   apache2//HANDLING_UNTRUSTED_INPUT
   apache2//phpsysinfo
   avahi-daemon
   dnsmasq
   dnsmasq//libvirt_leaseshelper
   dovecot
   dovecot-anvil
   dovecot-auth
   dovecot-config
   dovecot-deliver
   dovecot-dict
   dovecot-director
   dovecot-doveadm-server
   dovecot-dovecot-auth
   dovecot-dovecot-lda
   dovecot-dovecot-lda//sendmail
   dovecot-imap
   dovecot-imap-login
   dovecot-lmtp
   dovecot-log
   dovecot-managesieve
   dovecot-managesieve-login
   dovecot-pop3
   dovecot-pop3-login
   dovecot-replicator
   dovecot-script-login
   dovecot-ssl-params
   dovecot-stats
   ghostscript
   gitweb.cgi
   identd
   klogd
   libvirtd
   libvirtd//qemu_bridge_helper
   lsb_release
   mdnsd
   nmbd
   nscd
   ntpd
   nvidia_modprobe
   nvidia_modprobe//kmod
   passt
   pasta
   php-fpm
   ping
   plasmashell
   plasmashell//QtWebEngineProcess
   samba-bgqd
   samba-dcerpcd
   samba-rpcd
   samba-rpcd-classic
   samba-rpcd-spoolss
   sbuild
   sbuild-abort
   sbuild-adduser
   sbuild-apt
   sbuild-checkpackages
   sbuild-clean
   sbuild-createchroot
   sbuild-destroychroot
   sbuild-distupgrade
   sbuild-hold
   sbuild-shell
   sbuild-unhold
   sbuild-update
   sbuild-upgrade
   smbd
   smbldap-useradd
   smbldap-useradd///etc/init.d/nscd
   syslog-ng
   syslogd
   traceroute
   unix-chkpwd
   unprivileged_userns
   virt-aa-helper
   virtqemud
   virtqemud//qemu_bridge_helper
   virtxend
   winbindd
   zgrep
   zgrep//helper
   zgrep//sed
6 profiles are in complain mode.
   Xorg
   ghostscript///usr/bin/hpijs
   transmission-cli
   transmission-daemon
   transmission-gtk
   transmission-qt
0 profiles are in prompt mode.
0 profiles are in kill mode.
75 profiles are in unconfined mode.
   1password
   Discord
   MongoDB Compass
   QtWebEngineProcess
   balena-etcher
   brave
   buildah
   busybox
   cam
   ch-checkns
   ch-run
   chrome
   chromium
   devhelp
   element-desktop
   epiphany
   evolution
   firefox
   flatpak
   foliate
   geary
   github-desktop
   goldendict
   ipa_verify
   kchmviewer
   keybase
   lc-compliance
   libcamerify
   linux-sandbox
   loupe
   lxc-attach
   lxc-create
   lxc-destroy
   lxc-execute
   lxc-stop
   lxc-unshare
   lxc-usernsexec
   mmdebstrap
   msedge
   nautilus
   notepadqq
   obsidian
   opam
   opera
   pageedit
   polypane
   privacybrowser
   qcam
   qmapshack
   qutebrowser
   rootlesskit
   rpm
   rssguard
   scide
   signal-desktop
   slack
   slirp4netns
   steam
   stress-ng
   surfshark
   systemd-coredump
   thunderbird
   toybox
   trinity
   tup
   tuxedo-control-center
   userbindmount
   uwsgi-core
   vdens
   virtiofsd
   vivaldi-bin
   vpnns
   vscode
   wike
   wpcom
37 processes have profiles defined.
4 processes are in enforce mode.
   /usr/sbin/avahi-daemon (1154) avahi-daemon
   /usr/sbin/dnsmasq (69288) dnsmasq
   /usr/sbin/dnsmasq (69289) dnsmasq
   /usr/sbin/nmbd (2004) nmbd
0 processes are in complain mode.
0 processes are in prompt mode.
0 processes are in kill mode.
33 processes are unconfined but have a profile defined.
   /opt/vivaldi/vivaldi-bin (9536) vivaldi-bin
   /opt/vivaldi/chrome_crashpad_handler (9544) vivaldi-bin
   /opt/vivaldi/chrome_crashpad_handler (9546) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (9552) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (9553) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (9555) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (9647) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (9649) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (9661) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (9680) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (9698) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (9701) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (9725) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (9726) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (10644) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (11002) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (12882) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (12905) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (12923) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (12934) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (12945) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (13663) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (13664) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (13704) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (16080) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (16463) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (16487) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (52813) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (52921) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (52994) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (56451) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (75443) vivaldi-bin
   /opt/vivaldi/vivaldi-bin (75597) vivaldi-bin
0 processes are in mixed mode.
You have new mail in /var/mail/tom
(base) tom@mydesktop: ~ $ sudo sestatus
sudo: sestatus: command not found
(base) tom@mydesktop: ~ $ 

From above it is seen that: “plocate” is in enforce mode. I don’t really have any idea what this means.

tom kosvic

I think it means it’s “enforcing” the policies (“protection?”), while “permissive” or “disabled” does the opposite. Either way, I’m now using find. I prefer it after using it for a few days. I do not have a million files in $HOME so I don’t notice a lag.