I want a normal user to be able to update the database used by the locate command in Linux. With the previous version of locate (provided by the package mlocate), I achieved this by adding the following entry into /etc/sudoers:
user ALL = (ALL) NOPASSWD: /usr/bin/updatedb
However, this doesn't work with the new version of locate (provided by the package plocate), which prints the following error when running updatedb:
/var/lib/plocate/: Permission denied
What is the simplest way to allow a normal user to run updatedb?
PS: there's a similar question to mine from 2012, but it is for an older package, slocate.