[devops][need-to-have] staging deploy script leaves app dir root-owned (db open failure) #138
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Observed during #90 release-readiness rerun on 2026-02-28.
Problem:
infra/staging/deploy_staging.sh maincopies release content as root into/opt/wpp-staging/appand does not restore ownership to service user (wpp)./opt/wpp-staging/app/db.sqlite3).django.db.utils.OperationalError: unable to open database file.Evidence:
root:root, db file missingchown -R wpp:wpp /opt/wpp-staging/app+ migrate + restart) restored service and smoke PASSRequired fix (automation):
wpp) before migrate/service restart.Related: #90, #130
Implemented fix on branch
feature/fix-138-staging-app-ownershipand opened PR #139.Root cause:
/opt/wpp-staging/appwithout a strict ownership guard at directory-creation/promote boundaries.unable to open database file).Artifact:
30c22d2f0ce21a9c8e5f030faff979d57a8f943430c22d2(fix(staging): enforce writable app ownership during deploy)Checks run:
bash -n infra/staging/deploy_staging.shPR: