Permission denied when running locate command

This document (000021204) is provided subject to the disclaimer at the end of this document.


SUSE Linux Enterprize Server 15


When installing the mlocate package, the locate command prints a "permission denied" message after 1 day:
sles15sp5:~ # locate someWord
locate: can not open `/var/lib/mlocate/mlocate.db': Permission denied
Directly after installing the package it worked fine


SUSE engineering is aware of the problem and this document will be updated once a fix is available.

As workaround following command can be executed after the mlocate service has been run:

chmod o+r /var/lib/mlocate/mlocate.db



The mlocate package provides a timer which triggers the mlocate.service to run. When running the updatedb command the default umask is used to create new database file.

Within file /etc/login.defs the default umask was changed from 022 to 077 and apparmor is enforced:

aa-enforce /usr/bin/locate



Reported to Engineering


This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000021204
  • Creation Date: 10-Jan-2024
  • Modified Date:10-Jan-2024
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center