-
Notifications
You must be signed in to change notification settings - Fork 639
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
www/caddy: Add optional "DisableSuperuser" to run caddy as non root #4081
Merged
Conversation
This file contains 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
…orts 1024 or above are used.
…dy_user and caddy_group to www when DisableSuperuser is activated.
Monviech
changed the title
www/caddy: Add optional "DisableSuperuser" to run caddy as non root
[WIP] www/caddy: Add optional "DisableSuperuser" to run caddy as non root
Jul 9, 2024
3 tasks
…www owners, differentiate between directories and files when creating permissions.
So far, this feature looks promising.
So far, no jank at all, even when changing this multiple times, and rebooting, and messing around. |
Monviech
changed the title
[WIP] www/caddy: Add optional "DisableSuperuser" to run caddy as non root
[WIPwww/caddy: Add optional "DisableSuperuser" to run caddy as non root
Jul 10, 2024
Monviech
changed the title
[WIPwww/caddy: Add optional "DisableSuperuser" to run caddy as non root
www/caddy: Add optional "DisableSuperuser" to run caddy as non root
Jul 10, 2024
Monviech
changed the title
www/caddy: Add optional "DisableSuperuser" to run caddy as non root
[WIP] www/caddy: Add optional "DisableSuperuser" to run caddy as non root
Jul 10, 2024
fichtner
reviewed
Jul 10, 2024
www/caddy/src/opnsense/service/templates/OPNsense/Caddy/rc.conf.d/caddy
Outdated
Show resolved
Hide resolved
Monviech
changed the title
[WIP] www/caddy: Add optional "DisableSuperuser" to run caddy as non root
www/caddy: Add optional "DisableSuperuser" to run caddy as non root
Jul 10, 2024
fichtner
reviewed
Jul 10, 2024
www/caddy/src/opnsense/service/templates/OPNsense/Caddy/rc.conf.d/caddy
Outdated
Show resolved
Hide resolved
3 tasks
…sers about conflicting ports in otherwise hidden forms in the Reverse Proxy Domains view.
Merged, thanks! |
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.
I wanted to find the least invasive way to offer an optional way to run caddy as
www
user.Disable Superuser
has to be enabled.Now, the following will happen:
disable_dialog
is alreadyfalse
:plugins/www/caddy/src/opnsense/mvc/app/views/OPNsense/Caddy/general.volt
Line 85 in 490034f
www
in the templaterc.conf.d/caddy
The user has to manually restart the service with the service buttons after enabling
Disable Superuser
, since the Apply button only reloads.How does this work?
setup.sh
script, to allowroot:www
access to all files and directories that Caddy uses. This allows the binary to change fromroot
towww
at any time.root:www
from here on out. This prevents jank.root:www
as well. This allows caddy to write to it as either root or www, and syslog-ng to write to it as root.