The locate
command is very useful tool on Linux, but it seems only root can run updatedb
command which is very unconvinent to use it. So how to make ordinary user to have the priviledge to run updatedb command?
updatedb
is the command use to update the db used by locate command.
But there is the following error message when try to run updatedb as ordinary user:
[mirror@home code]$ updatedb
updatedb: can not open a temporary file for `/var/lib/mlocate/mlocate.db'
Or:
updatedb -o db
updatedb: can not change group of file `/var/lib/gforge/chroot/home/users/bigmeow/tmp/db.uhEZFQ': Operation not permitted