From 72079050f42a92db83a093b44fc7a476d1d0fd09 Mon Sep 17 00:00:00 2001 From: openhands Date: Tue, 28 Jul 2026 22:36:39 +0200 Subject: [PATCH] fix(deploy): use deploy user for file ownership instead of www-data Changing ownership to www-data at end of deploy breaks permission handling when pm2 runs as a different user (e.g., root or the deploy user). Keep ownership as the deploy user throughout. --- .gitea/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 0aeff37d..084cd96d 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -377,7 +377,7 @@ jobs: # Prisma client is gitignored — regenerate into live src/generated. pnpm prisma:generate - sudo chown -R www-data:www-data "${LIVE}" 2>/dev/null || true + sudo chown -R "${DEPLOY_USER}:${DEPLOY_GROUP}" "${LIVE}" 2>/dev/null || true echo "Starting PM2 (zero-downtime reload)..." pm2 reload next --update-env || pm2 start next --update-env