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

setting capabilities no longer works? #17

Open
skyfaller opened this issue Apr 6, 2022 · 2 comments
Open

setting capabilities no longer works? #17

skyfaller opened this issue Apr 6, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@skyfaller
Copy link
Contributor

- name: let caddy bind to ports 80 and 443
capabilities:
path: '{{ caddy_binary_location }}'
capability: cap_net_bind_service=+ep
state: present
listen: restart caddy
has been failing on both production Arch Linux and test Alpine Linux. What's with that?

@skyfaller skyfaller added the bug Something isn't working label Apr 6, 2022
@skyfaller
Copy link
Contributor Author

typical error:

RUNNING HANDLER [sunrise : let caddy bind to ports 80 and 443] ************************************************************
fatal: [america.maximumethics.dev]: FAILED! => {"changed": false, "msg": "Unable to get capabilities of /usr/bin/caddy", "stderr": "", "stderr_lines": [], "stdout": "/usr/bin/caddy cap_net_bind_service=ep", "stdout_lines": ["/usr/bin/caddy cap_net_bind_service=ep"]}

@skyfaller
Copy link
Contributor Author

skyfaller commented Apr 6, 2022

Maybe we're not supposed to do this at all on newer versions of systemd? https://newbedev.com/caddy-listen-tcp-443-bind-permission-denied

I guess I'll plan to disable it on Arch Linux, which is on systemd 250? We already have AmbientCapabilities=CAP_NET_BIND_SERVICE in our service file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant