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

nixos/asf: fix home directory permissions, for real #176133

Merged
merged 5 commits into from
Jun 6, 2022

Conversation

SuperSandro2000
Copy link
Member

Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Jun 3, 2022
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Jun 3, 2022
(mkIf (cfg.dataDir == "/var/lib/asf") { StateDirectory = "asf"; })
(mkIf (cfg.dataDir == "/var/lib/asf") {
StateDirectory = "asf";
StateDirectoryMode = "700";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if this should be 700 or 750 but I am really sure that the last bit must be a 0.

Copy link
Member

@mweinelt mweinelt Jun 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the last octet even

@legendofmiracles
Copy link
Contributor

I only just finished compiling your first PR.. and the service failed with touch config/bot: permission denied (paraphrased).
Is that what reverting the commit fixes?
I don't think this module has many users either way, pushing something breaking (for a much better module in the long term) shouldn't be the end of the world

@SuperSandro2000
Copy link
Member Author

SuperSandro2000 commented Jun 4, 2022

Is that what reverting the commit fixes?

No, the reverted commit was actually a noop.

The error you got was probably caused by not setting the default correct and not actually testing the default locally.

If we break something we should try to fix it but I don't think that after this PR anything is broken.

Copy link
Member Author

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume your testing was successful and we can merge this? Your change is LGTM to me.

@SuperSandro2000
Copy link
Member Author

btw is the log tab for you working? For me it just shows blank.

@legendofmiracles
Copy link
Contributor

legendofmiracles commented Jun 4, 2022

I've tried it again, deleted all my asf stuff and restarted it with what is running on 22.05. Then when I updated to this branch (might also be from the other PR) it fails with cp: cannot create regular file 'config/ASF.json': Read-only file system. Only after I remove /var/lib/asf does it work.

The log tab still works for me, with and before this patch.

Also, I've forced pushed my commit again because the copying of the file wasn't optional resulting in an error if ipcPasswordFile was not set

@SuperSandro2000
Copy link
Member Author

The log tab still works for me, with and before this patch.

I just checked my browser console and there is an error. Probably unrelated to this.

@SuperSandro2000 SuperSandro2000 merged commit d8fad83 into NixOS:master Jun 6, 2022
@SuperSandro2000 SuperSandro2000 deleted the asf-2 branch June 6, 2022 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants