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

Created file is not readable #1

Open
andrew-d opened this issue Aug 30, 2021 · 1 comment
Open

Created file is not readable #1

andrew-d opened this issue Aug 30, 2021 · 1 comment

Comments

@andrew-d
Copy link
Contributor

The upstream tempfile crate explicitly sets the mode of a created named file to 0600, which means that the use here creates a temporary file that can only be read by root and the corresponding user.

I've worked around this for now by doing:

systemd.services.zpool-exporter-textfile.serviceConfig.ExecStartPost =
  let
    prog = pkgs.writeShellScript "fix-perms" ''                       
      chmod -R +r $STATE_DIRECTORY
    '';

  in [
    # run as root
    "+${prog}"
  ];

But I figured I'd report it 😃

@antifuchs
Copy link
Collaborator

Thanks for the report - I believe a real fix where users can specify the file mode for the export is currently ~blocked by Stebalien/tempfile#137.

Meanwhile, I added your workaround in 74f6604

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants