Rights issue with locate in 24.7.1

Started by bringha, August 18, 2024, 10:44:40 AM

Previous topic - Next topic
G'day,

I just noticed an exec rights issue with the 'locate' command in 24.7.1.

Executing as root eg 'locate newwanrc', it shows


locate: the locate database '/var/db/locate.database' is smaller than 256 bytes large.

To create a new database, please run the following command as root:

  /etc/periodic/weekly/310.locate


Executing then as root

  /etc/periodic/weekly/310.locate

It only outputs

Rebuilding locate database:
Must be root.

No database is created... Also the weekly update of this database is obviously not working

Before throwing something in Git: freebsd 14.1 issue or opnsense?

br br


August 18, 2024, 11:25:23 AM #1 Last Edit: August 18, 2024, 11:28:25 AM by doktornotor
None of the /etc/peridioc stuff is being run, on purpose. Contains loads of stuff absolutely irrelevant for OPNsense, this is not a general-purpose FreeBSD box.

You can run /usr/libexec/locate.updatedb once every major version upgrade, ignore the root warning since everyone having shell aceess is more or less root - and move on.

P.S. You appear to be the second user trying to use locate in OPNsense, in all those years. Congrats.  ;D

OK, thanks this works also perfectly fine for me ...

Next time I will ask directly about a potential intention  ;D ;D ;D    its a shame to be second ....

br br