Ensure daemon ownership for files created at startup#726
Merged
dnzbk merged 1 commit intonzbgetcom:developfrom Feb 16, 2026
Merged
Ensure daemon ownership for files created at startup#726dnzbk merged 1 commit intonzbgetcom:developfrom
dnzbk merged 1 commit intonzbgetcom:developfrom
Conversation
PR nzbgetcom#345 introduced checks for successful privdrop and ensured that missing files/directories were created as `DaemonUsername`. However, this was partly reverted due to regressions in extensions (nzbgetcom#353). This partial revert caused a side effect where missing files and folders are once again created by `root` during startup. This commit fixes the ownership issue by explicitly calling chown(2) after creation, ensuring the privdropped daemon can access its data.
f08acf2 to
e858bd8
Compare
Contributor
Author
|
Hi @dnzbk , I have just rebased this against the latest develop branch to ensure it is still merging cleanly. I have also been running this build for some time on OpenBSD without any issues. |
Collaborator
|
@bket Hi, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #345 introduced checks for successful privdrop and ensured that missing files/directories were created as
DaemonUsername. However, this was partly reverted due to regressions in extensions (#353).This partial revert caused a side effect where missing files and folders are once again created by
rootduring startup.This commit fixes the ownership issue by explicitly calling chown(2) after creation, ensuring the privdropped daemon can access its data.
Tested on OpenBSD.
@bacon-cheeseburger, please chime in.