Re: No Locate for User

Greg Olszewski
2005-04-26T05:42:41Z

I suspect you'll simply need to do:

chmod 2755 $(which slocate)
chown root:slocate $(which slocate)
(which is probably the same as)

chmod 2755 /usr/bin/slocate
chown root:slocate /usr/bin/slocate

slocate considers the db file to be sensitive (as well it should). the
slocate binary needs to run as the slocate group to use it.

> @~:$ /mnt/rh9root/usr/bin/locate fips
> warning: locate: could not open database: /var/lib/slocate/slocate.db:
> Permission denied
> warning: You need to run the 'updatedb' command (as root) to create the
> database.
>

Um. This could be due to many things. Perhaps the partition is mounted
nosuid, and slocate isn't running with the right permissions. Perhaps
you've got a different version of slocate on fedora than slackware.
Running a binary from one version against data from another shouldn't be
expected to work. 'chroot /mnt/rh9root locate fips' ought to work fine.

have fun,

greg