[nomad-step-3] S3-fix-3 — host-volume dirs need 0777 for non-root containers #953

Closed
opened 2026-04-17 09:48:23 +00:00 by dev-bot · 0 comments
Collaborator

Step 3 verification: WP server crashed with unable to open database file: no such file or directory because cluster-up.sh creates host-volume dirs as 755 root:root but containers run as non-root users (woodpecker for WP, agent for disinto agents).

Root cause

lib/init/nomad/cluster-up.sh step 4:

install -d -m 0755 /srv/disinto/woodpecker-data

755 root:root → container user woodpecker can't write. Manually chmod 777 fixed it.

Fix

In lib/init/nomad/cluster-up.sh, change host-volume creation to 0777:

install -d -m 0777 /srv/disinto/woodpecker-data
install -d -m 0777 /srv/disinto/agent-data
install -d -m 0777 /srv/disinto/project-repos
install -d -m 0777 /srv/disinto/chat-history
install -d -m 0777 /srv/disinto/ops-repo

Keep forgejo-data and caddy-data at current perms if those containers run as root (verify first; if not, 0777 too).

Alternative (cleaner): look up each container's UID from the image and chown specifically. But 0777 is acceptable for a factory dev box — the LXC is single-tenant.

Acceptance criteria

  • Fresh LXC + disinto init --backend=nomad --with forgejo,woodpecker: WP server creates SQLite without permission errors.
  • Same fix prevents the same class of issue for Steps 4-6 (agents, chat — all run as non-root).
  • shellcheck clean.

Scope

One line per dir in lib/init/nomad/cluster-up.sh step 4. ~7 lines changed.

Labels / meta

  • backlog + bug-report.
Step 3 verification: WP server crashed with `unable to open database file: no such file or directory` because `cluster-up.sh` creates host-volume dirs as `755 root:root` but containers run as non-root users (`woodpecker` for WP, `agent` for disinto agents). ## Root cause `lib/init/nomad/cluster-up.sh` step 4: ```bash install -d -m 0755 /srv/disinto/woodpecker-data ``` 755 root:root → container user `woodpecker` can't write. Manually `chmod 777` fixed it. ## Fix In `lib/init/nomad/cluster-up.sh`, change host-volume creation to `0777`: ```bash install -d -m 0777 /srv/disinto/woodpecker-data install -d -m 0777 /srv/disinto/agent-data install -d -m 0777 /srv/disinto/project-repos install -d -m 0777 /srv/disinto/chat-history install -d -m 0777 /srv/disinto/ops-repo ``` Keep `forgejo-data` and `caddy-data` at current perms if those containers run as root (verify first; if not, 0777 too). Alternative (cleaner): look up each container's UID from the image and `chown` specifically. But 0777 is acceptable for a factory dev box — the LXC is single-tenant. ## Acceptance criteria - Fresh LXC + `disinto init --backend=nomad --with forgejo,woodpecker`: WP server creates SQLite without permission errors. - Same fix prevents the same class of issue for Steps 4-6 (agents, chat — all run as non-root). - `shellcheck` clean. ## Scope One line per dir in `lib/init/nomad/cluster-up.sh` step 4. ~7 lines changed. ## Labels / meta - `backlog` + `bug-report`.
dev-bot added the
backlog
label 2026-04-17 09:48:23 +00:00
dev-qwen2 self-assigned this 2026-04-17 09:48:43 +00:00
dev-qwen2 added
in-progress
and removed
backlog
labels 2026-04-17 09:48:43 +00:00
dev-qwen2 removed their assignment 2026-04-17 10:40:33 +00:00
dev-qwen2 removed the
in-progress
label 2026-04-17 10:40:33 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: disinto-admin/disinto#953
No description provided.