Fix git dubious ownership: chown ncadmin + safe.directory

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Hannes Ahlin
2026-08-22 15:25:49 +02:00
parent f7ac692020
commit af95e349ff
2 changed files with 76 additions and 4 deletions
+9
View File
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
# Snabbfix om git "dubious ownership" efter root-kloning
set -euo pipefail
DIR="${1:-/home/ncadmin/nextcloud-collabora-nodered}"
USER="${2:-ncadmin}"
echo "chown ${USER} ${DIR}"
chown -R "${USER}:${USER}" "${DIR}"
sudo -u "${USER}" git config --global --add safe.directory "${DIR}"
echo "Klart. Kör: cd ${DIR} && ./install.sh"