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

No PermissionsStartOnly=true #1251

Merged
merged 1 commit into from
Dec 18, 2022
Merged

Conversation

lkiesow
Copy link
Contributor

@lkiesow lkiesow commented Dec 5, 2022

This patch removes PermissionsStartOnly=true from the systemd unit file used for packaging. This shouldn't be necessary for any commands run by the unit.

Note that while I'm pretty sure that this is not necessary, I did not test this.
We should do that before merging this.

This patch removes `PermissionsStartOnly=true` from the systemd unit
file used for packaging. This shouldn't be necessary for any commands
run by the unit.
@advplyr
Copy link
Owner

advplyr commented Dec 8, 2022

Was this requiring the systemd to be run with sudo?

@lkiesow
Copy link
Contributor Author

lkiesow commented Dec 9, 2022

Was this requiring the systemd to be run with sudo?

I'm not actually sure what you mean?

  • Systemd is the init system and should always have the UID 0 and therefor superuser privileges.
  • If you are asking if this changes, if you can start or stop the system service with(out) root privileges now (systemctl start audiobookshelf.service), this patch should cause no difference in behavior.
  • If your question is if you can now run this using the service manager of the calling user (systemctl --user start audiobookshelf.service), this still shouldn't work, given the rest of the unit specification.

The difference PermissionsStartOnly should make is only if all commands are run using the specified user and group, or just the start command. In practice, that means that without this patch ExecReload=/bin/kill -HUP $MAINPID is run as user root which are unnecessarily high privileges. If the service is run as user audiobookshelf it should suffice to run kill as that user as well. That's what this patch should change.

@advplyr
Copy link
Owner

advplyr commented Dec 9, 2022

Thanks for the clarification. I saw 2 users post that they needed to use root to run the service. I can't remember now where I saw those reports but I popped over here to mention it incase it was related.

@advplyr advplyr merged commit b787fb1 into advplyr:master Dec 18, 2022
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.

None yet

2 participants