I tried using locate to locate a certain file which is dog.jpg, I just updated the locate database and it does not show up since locate only finds files owned by user nobody, and the file dog.jpg is owned by user vincent. As stated here,

The locate database is typically built by user nobody'' and the locate.updatedb(8) utility skips directories which are not readable for usernobody'', group ``nobody'', or world. For example, if your HOME directory is not world-readable, none of your files are in the database. how do I make locate command find dog.jpg even though it is owned by user vincent? I tried adding user nobody to wheel group, it does not show too.

Any other work around or advice? Thank you!

  • Some of the statements in your question are incorrect. Locate can find files owned by any user, as long as those files can be read by any user. So are you trying to create a locate database that contains your private files? – Richard Smith Jul 12 '19 at 9:11
  • I want locate to find all files in my computer, do you have a solution for that? – Vincent Ret Jul 13 '19 at 6:38
  • Have you tried running locate.updatedb as root? – Richard Smith Jul 13 '19 at 12:00
  • I did, but the problem persists. – Vincent Ret Aug 31 '19 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.