9
6
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
you explain what the
--require-visibility
flag is... but maybe you could explain a little bit about why? like why not just do what @xaizek is doing and generate the database in a location your user has permission without using the--require-visibility
flag? – Trevor Boyd Smith – 2018-11-29T15:28:53.327later on in the man page there is an answer to my question:
SECURITY Databases built with --require-visibility no [tbs: or 0] allow users to find names of files and directories of other users, which they would not otherwise be able to do.
– Trevor Boyd Smith – 2018-11-29T15:39:55.397