| Summary: | Files in moved directory don't show up in search results | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Alexandre Oberlin <alxobr> |
| Component: | mlocate | Assignee: | Miloslav Trmač <mitr> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 14 | CC: | mitr |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i686 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-06-01 18:26:42 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Alexandre Oberlin
2011-05-27 14:15:36 UTC
Thanks for your report. In reporting results of the search, mlocate is not limited only by the -e option, but, for databases created with --require-visibility yes, also by file permissions: there is a single database for all files, but mlocate only shows you the files that you would have been able to find anyway (e.g. unprivileged users can't see any files under /root). This permission check is performed at the time you run locate, based on the file permissions at that time. So (locate mlocate_testfile) needs to check the permissions of: - / - /home - /home/alex - /home/alex/works - /home/alex/works/mlocate_testdir before it can conclude that you have the required permissions to find mlocate_testfile.txt . When mlocate_testdir does not exist, locate can not check its permissions and therefore it does not show the file. (On the other hand, (locate mlocate_testdir) does show the test directory even if it does not exist any more, because the "works" directory exists and it is readable, so you would have been able to find mlocate_testdir if it still existed.) The system database is built using the implicit value "--require-visibility yes", therefore locate only shows the files in existing directories. Using (updatedb --require-visibility no) you can create a database that does not have this behavior, but the system default needs to stay secure. |