What is the "official" proper way to update the locate DB?
/etc/periodic/weekly/310.locate
or periodic weekly 310.locate
Run as root. I.e. precede sudo(8) or runas(8) to the above commands, or log in as root, e.g. invoke the commandCode:/usr/libexec/locate.updatedb: cannot create /var/db/locate.database: Permission denied
su -
.The OP points out the problem with running locate.updatedb; regular users don't have permission to create the db because its owned by nobody so only root and nobody can update it.If you want to manually run the database update once: /usr/libexec/locate.updatedb. Read the man page for locate.updatedb first, and look in /etc/periodic/.../320.locate, which will show you examples of the command line arguments.