Skip to content

Commit f44f2a3

Browse files
committed
provision:website: Set log directory group-writable for Caddy
Ensures the caddy daemon (which runs as group `caddy`) can create `access.log` within `{{deploy_path}}/log`. Without `775` permissions, `service caddy reload` fails to open the log writer.
1 parent 08eb7c7 commit f44f2a3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

recipe/provision/website.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727

2828
run("[ -d {{deploy_path}}/log ] || mkdir -p {{deploy_path}}/log");
2929
run("chown deployer:caddy {{deploy_path}}/log");
30+
// Group-writable so the caddy daemon (group caddy) can create access.log;
31+
// otherwise `service caddy reload` fails to open the log writer.
32+
run("chmod 775 {{deploy_path}}/log");
3033

3134
$restoreBecome = become('deployer');
3235

0 commit comments

Comments
 (0)