You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A non-root user cannot access the database for mlocate due to incorrect permissions.
To Reproduce
Steps to reproduce the behavior:
Set services.locate.locate = pkgs.mlocate and nixos-rebuild switch.
Attempting to find a file as a non-root user ends in an error.
$ locate subgid
/run/current-system/sw/bin/locate: can not open `/var/cache/locatedb': Permission denied
/run/current-system/sw/bin/locate: can not open `/var/cache/locatedb': Permission denied
Thanks @wentasah. It turned out to be operator error. I didn't realize when I created a script that does some post processing of the output that I should use /run/wrappers/bin/locate rather than /run/current-system/sw/bin/locate. Fixing the script solved the problem.
Describe the bug
A non-root user cannot access the database for mlocate due to incorrect permissions.
To Reproduce
Steps to reproduce the behavior:
services.locate.locate = pkgs.mlocate
andnixos-rebuild switch
.Related issues
Expected behavior
A non-root user must be able to use mlocate or there is no reason for installing it.
Notify maintainers
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Maintainer information:
The text was updated successfully, but these errors were encountered: