OPNsense Forum

English Forums => 24.7, 24.10 Legacy Series => Topic started by: bringha on August 18, 2024, 10:44:40 AM

Title: Rights issue with locate in 24.7.1
Post by: bringha on August 18, 2024, 10:44:40 AM
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

Title: Re: Rights issue with locate in 24.7.1
Post by: doktornotor on August 18, 2024, 11:25:23 AM
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 (https://forum.opnsense.org/index.php?topic=18693.0) trying to use locate in OPNsense, in all those years. Congrats.  ;D
Title: Re: Rights issue with locate in 24.7.1
Post by: bringha on August 18, 2024, 05:10:32 PM
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