[OCaml] High Intensity Training Online
fix Make setup.sh releases readable by hito
mktemp -d creates the staging directory with mode 0700, and the release keeps that mode after the move into releases/. The service now runs as hito rather than the owning git user, so systemd failed at CHDIR and the health check rolled current back. Open the release directory to 0755. The post-receive hook was not affected.
deploy/setup.sh
@@ -193,6 +193,8 @@
193
193
mkdir -p "${RELEASES}"
194
194
chown "${SVC_USER}:${SVC_GROUP}" "${RELEASES}"
195
195
mv "${stage}" "${rel}"
196
Added:
# mktemp -d creates 0700; the runtime user must be able to enter the release.
197
Added:
chmod 0755 "${rel}"
196
198
ln -sfn "${DB}" "${rel}/hito.sqlite"
197
199
198
200
subject="$(git --git-dir="${BARE}" log -1 --format=%s "${sha}")"