Change:
I noticed my locatedb hasn't been updated in ~34 days. The is failing. Here's the full output: And for some reason, some of the log lines are missing from that, so here's the systemctl status output for that service: Relevant lines:
I can't find any trace of (with a ), at least on master and the latest unstable channel. What service do you mean?
Argh, sorry, I read it (notice ). Sorry, sleepy.
has problems on my unstable NixOS system too:
I confirm the problem
I have the same problem and see this in systemd's journal: The systemd service seems to have been defined like this: So it seems that is not being correctly specified.
This is what I wanted to write: However, this is still not fixed: returns (after a call to (which has exit status 0)) So, this is not fixed in 16.03. Please reopen. If is not meant to be callable as root, then should be a wrapper of some kind which would say However, I think pretty much anyone with some Linux experience wants to be able to easily build a new index when they want and has historically been the UI/API to do that. Changing that, if that was the intention, is a rather ill-conceived idea.
So, is this supposed to be working? I am still getting the same error.
This issue was about the systemd service failing with a / , it wasn't about not being able to find the file, even after running manually (I would file a separate issue for that). is the error you are still getting the failure in the systemd service? If so, which release / branch / channel are you running?
I still get the same error "read-only filesystem." I suspect this is because the only service I have running that wants to create /var/cache is the one for updatedb, which still doesn't have write permissions to /var to do so. Manually creating /var/cache as root fixes the problem.
Just installed nixos. I to get this errror. Is there any fix for this.?
Same here on a fresh install as root: nixos /nix/store/w1gzi0342kiha08pym7qj09w09ffzhj4-findutils-4.6.0/bin/updatedb: line 323: /nix/store/w1gzi0342kiha08pym7qj09w09ffzhj4-findutils-4.6.0/var/locatedb.n: Read-only file system
just installed 16.09 and I'm getting the same, Read-only file system on updatedb
VERSION="16.09.1836. (Flounder)" nix-env (Nix) 1.11.7 works fine if updatedb is used with --output and later locate is used with --database when invoked by root in a login shell, updatedb tries to write to: /nix/store/95vfigaqdg8jg5bk961k1x06j86p5fh0-findutils-4.6.0/var/locatedb.n: Read-only file system when invoked by user in a login shell, updatedb tries to write to: /nix/store/95vfigaqdg8jg5bk961k1x06j86p5fh0-findutils-4.6.0/var/locatedb.n: Read-only file system this path comes from updatedb shell script which was modified in nix (this line is different in the gnu sources): 186: ${LOCATE_DB=/nix/store/95vfigaqdg8jg5bk961k1x06j86p5fh0-findutils-4.6.0/var/locatedb} systemd service seems to be updating the db: but doesn't have access to some dirs: I'm not surprised it doesn't have access to home, but shouldn't the service be able to list /nix/store files? There are no error messages for /nix/store: the ticket is about service failing to write to /var/cache/locatedb, but it works fine on 16.09, so I think it can be closed. I see two other problems though: update-locatedb service not being able to process /nix/store running updatedb on the cli tries to write to /nix/store which is a read-only file system
is caused by an option, now named , which contains "/nix/store" by default, the issue is closed already. is resolved by merged , the issue can be closed. is about using updatedb from cli and missing /var/cache directory and needs a decision.

Discussion:
serviceConfig.PrivateNetwork = "yes"; serviceConfig.NoNewPrivileges = "yes"; serviceConfig.ReadOnlyDirectories = "/"; <del> serviceConfig.ReadWriteDirectories = cfg.output; </del> <ins> serviceConfig.ReadWriteDirectories = dirOf cfg.output; </ins> }; systemd.timers.update-locatedb = mkIf cfg.enable