mirror of
https://github.com/caddyserver/caddy.git
synced 2025-03-04 04:29:40 +08:00

In systemd 231
(4f10b80786/NEWS (L3558-L3565)
),
ReadWriteDirectories was renamed ReadWritePaths.
In https://github.com/caddyserver/caddy/pull/2620/files, @aspeteRakete
renamed the directive in Caddy's example systemd unit.
However, this means that if anyone runs this sytemd unit on a version of
systemd older than 231, Caddy will go into a crash loop that hammers
Let's Encrypt's servers. That's because the ProtectSystem=full directive
prevents writes to all paths that aren't explicitly permitted, and older
systemd doesn't see any paths being permitted.
To maximize compatibility, I re-add the original ReadWriteDirectories
directive. Older systemd will read that; newer systemd will read the
newer directive. Both should ignore the directive they do not recognize.
Another approach to solve this problem would be to remove
ProtectSystem=true, originally introduced in da8ae9e5. That would reduce
the risk of similar breakages in the future. It would make for a slightly
less "exemplary" systemd unit, but I think it would still be adequate,
given that this unit runs caddy as "www-data", a user the presumably has
low privileges.
CADDY 1.0.3 Website https://caddyserver.com Community Forum https://caddy.community Twitter @caddyserver Source Code https://github.com/caddyserver/caddy https://github.com/caddyserver For instructions on using Caddy, please see the docs on the website. For a list of what's new in this version, see CHANGES.txt. For a good time, follow @mholt6 on Twitter. Want to get involved with Caddy's development? We love to have contributions! Please file an issue on GitHub to discuss a change or fix you'd like to make, then submit a pull request and we'll review it! Your contributions will reach millions of people who connect to sites served by Caddy. Extend Caddy by developing a plugin for it! Instructions on the project wiki: https://github.com/caddyserver/caddy/wiki And thanks - you're awesome! --- (c) 2015-2019 Light Code Labs, LLC