Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ddclient: WARNING: file /run/ddclient/ddclient.conf: file /run/ddclient/ddclient.conf must be accessible only by its owner. #48433

Closed
bjornfor opened this issue Oct 14, 2018 · 3 comments · Fixed by #221380
Labels
0.kind: bug 0.kind: regression Something that worked before working no longer 6.topic: nixos

Comments

@bjornfor
Copy link
Contributor

Issue description

The NixOS module for ddclient installs the config file world-readable, since commit 642c8a8. This results in the following warning from ddclient:

WARNING:  file /run/ddclient/ddclient.conf: file /run/ddclient/ddclient.conf must be accessible only by its owner.

Steps to reproduce

  • Enable the NixOS ddclient module: services.ddclient = { enable = true; configFile = "/path/to/ddclient.conf"; }
  • When ddclient runs, /path/to/ddclient.conf will appear world-readable as /run/ddclient/ddclient.conf.

Technical details

  • system: "x86_64-linux"
  • host os: Linux 4.14.74, NixOS, 18.09.821.4dd9cd3f69e (Jellyfish)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.1.1
  • channels(bfo): ""
  • channels(root): "nixos-18.09.821.4dd9cd3f69e"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos
@shdpl
Copy link
Contributor

shdpl commented Apr 19, 2021

Should that not be reopened?
Is including -o ddclient and replacing -m666 with -m600 in ExecStartPre like this:
ExecStartPre = "!${lib.getBin pkgs.coreutils}/bin/install -o ddclient -m600 ${cfg.configFile} /run/${RuntimeDirectory}/ddclient.conf";
a valid solution?
I'm not sure if the user name is guaranteed to be unique

@infinisil
Copy link
Member

Oh yeah, and the above PR was reverted in #53045 too

@infinisil infinisil reopened this May 3, 2021
@keithy
Copy link

keithy commented Jun 13, 2021

Still getting this warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug 0.kind: regression Something that worked before working no longer 6.topic: nixos
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants