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

nix-daemon sets /tmp 775 and tempfilesd ignores second entry which should revert to 777 #85552

Closed
calbrecht opened this issue Apr 19, 2020 · 2 comments

Comments

@calbrecht
Copy link
Member

Describe the bug
nix-daemon.nix sets /tmp to 775 root root

That is written into /etc/tmpfiles.d/nixos.conf

systemd-tmpfiles ignores duplicate entries and warns when doing
sudo nixos-rebuild test with the message

[/etc/tmpfiles.d/tmp.conf:11] Duplicate line for path "/tmp", ignoring.

To Reproduce
Steps to reproduce the behavior:

  1. Have untouched config option systemd.tmpfiles.rules
  2. Run sudo nixos-rebuild test
  3. Read warning from systemd-tmpfiles
  4. See /tmp owned by root and not writeable by unpriviledged users

Expected behavior
/tmp should be writeable by unpriviledged users

Notify maintainers
@avnik

Metadata

  • system: "x86_64-linux"
  • host os: Linux 5.6.4, NixOS, 20.09.git.a2d9f584333M (Nightingale)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3.4
  • nixpkgs: /home/alab/ws/nixpkgs

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: systemd.tmpfiles.rules
# a list of nixos modules affected by the problem
module: nixos/modules/services/misc/nix-daemon.nix
@calbrecht calbrecht changed the title nix-daemon sets /tmp 775 and tempfilesd ignores second entry which reverts to 777 nix-daemon sets /tmp 775 and tempfilesd ignores second entry which should revert to 777 Apr 19, 2020
@primeos
Copy link
Member

primeos commented Apr 19, 2020

@calbrecht thanks btw for this issue :)

aij added a commit to aij/aij-nixos-config that referenced this issue Apr 20, 2020
Just far enough to get the fix for
NixOS/nixpkgs#85552

I'm surprised how much still worked without being able to
write to /tmp, though some of that may have been due to
existing files.
@aij
Copy link
Contributor

aij commented Apr 20, 2020

Thanks for the quick fix / rollback!

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

No branches or pull requests

3 participants