Skip to content

Ensure daemon ownership for files created at startup#726

Merged
dnzbk merged 1 commit intonzbgetcom:developfrom
bket:chown_upon_create
Feb 16, 2026
Merged

Ensure daemon ownership for files created at startup#726
dnzbk merged 1 commit intonzbgetcom:developfrom
bket:chown_upon_create

Conversation

@bket
Copy link
Copy Markdown
Contributor

@bket bket commented Jan 26, 2026

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 root during 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.

@dnzbk dnzbk self-requested a review January 27, 2026 06:05
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.
@bket bket force-pushed the chown_upon_create branch from f08acf2 to e858bd8 Compare February 15, 2026 20:00
@bket
Copy link
Copy Markdown
Contributor Author

bket commented Feb 15, 2026

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.

@dnzbk
Copy link
Copy Markdown
Collaborator

dnzbk commented Feb 15, 2026

@bket Hi,
I’ve seen your PR. I will get to it very soon.

Copy link
Copy Markdown
Collaborator

@dnzbk dnzbk left a comment

Choose a reason for hiding this comment

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

Thank you!

@dnzbk dnzbk merged commit 5d50559 into nzbgetcom:develop Feb 16, 2026
42 of 43 checks passed
@bket bket deleted the chown_upon_create branch April 5, 2026 19:55
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

Successfully merging this pull request may close these issues.

2 participants