From 431ba70f251f2b53b71a5fc372be7b3dd0626edd Mon Sep 17 00:00:00 2001 From: openfox-pilot Date: Tue, 13 Oct 2026 21:51:13 +0200 Subject: [PATCH] secrets photoprism 700/600 (finding verifier) : fix live + 07d chmod --- g9-migration/journal.md | 1 + g9-migration/scripts/07d-migrate-photoprism.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/g9-migration/journal.md b/g9-migration/journal.md index 1dd551a..e00e164 100644 --- a/g9-migration/journal.md +++ b/g9-migration/journal.md @@ -164,3 +164,4 @@ | 2026-10-13 19:40 | E2 | VM AdGuard .1 | reset usine Delta a isolé la VM (bridge VM derrière Delta, injoignable) | VM éteinte puis rallumée par utilisateur ; coupe AdGuardHome = via UI Delta (action utilisateur) ; DNS LAN = .27 (aucun impact) | redéploiement VM + AdGuardHome start | | 2026-10-13 19:42 | E3 | switch 10G SKS7300 | port SFP+ Delta éteint par reset usine → G9 isolé (IPv6 link-local seul) ; câble remplacé par RJ45 Delta↔switch (1G) | G9 visible ; SSH switch (admin, telnet) dispo pour remettre les VLANs 10G (untagged trunk uplink) à faire | re-câbler SFP+ + réactiver port fibre Delta | | 2026-10-13 20:00 | E4 | **openfox.folzocorp.fr** ajouté au Caddy .27 | Besoin utilisateur : suivre la config depuis son téléphone | reverse_proxy → 192.168.1.11:10369 ; cert LE émis ; 200 via LAN (.27) ET WAN (IP publique) ; fix mount stale = `compose up -d --force-recreate caddy` (rsync du Caddyfile ne suffit pas, inode monté) | retirer le block + recreate | +| 2026-10-13 20:30 | 4 | secrets PhotoPrism **644→600** (finding vérification) | Dossier 755/fichiers 644 = lisibles par tout utilisateur local (03b pose 644, 07d faisait chmod 755) | `chmod 700 secrets` + `chmod 600 secrets/*` sur .24 (admin/dbpass/rootpass/photoprism.env tous 600 root) ; conteneurs up intacts (env chargés au start, db lit /run/secrets en root) ; 07d corrigé (chmod 700 + sh -c 600) | chmod 644 (inverser, non recommandé) | diff --git a/g9-migration/scripts/07d-migrate-photoprism.sh b/g9-migration/scripts/07d-migrate-photoprism.sh index 5d34908..18a65b5 100755 --- a/g9-migration/scripts/07d-migrate-photoprism.sh +++ b/g9-migration/scripts/07d-migrate-photoprism.sh @@ -116,7 +116,7 @@ log "=== 4/5 STACK + SECRETS ===" rsync -a --info=stats1 -e "$RSH_G9" --exclude "secrets" "$KIT_DIR/compose/$BRIQUE/" "$G9_USER@$G9_HOST:$KIT_ON_G9/compose/$BRIQUE/" rsync -a -e "$RSH_G9" "$KIT_DIR/scripts/03b-secrets.sh" "$G9_USER@$G9_HOST:$KIT_ON_G9/scripts/" $SSH_G9 "sudo bash $KIT_ON_G9/scripts/03b-secrets.sh >/dev/null" -$SSH_G9 "sudo rsync -a $KIT_ON_G9/compose/$BRIQUE/ $G9_DIR/ && sudo chmod 755 $G9_DIR/secrets" +$SSH_G9 "sudo rsync -a $KIT_ON_G9/compose/$BRIQUE/ $G9_DIR/ && sudo chmod 700 $G9_DIR/secrets && sudo sh -c 'chmod 600 $G9_DIR/secrets/*'" $SSH_G9 "sudo chown -R 999:999 $G9_DIR/db && sudo chmod 750 $G9_DIR/db" # PhotoPrism n'accepte pas les *_FILE : env_file construit à partir des secrets (600, root, hors git). $SSH_G9 "sudo sh -c 'umask 077; { echo PHOTOPRISM_ADMIN_PASSWORD=\$(cat $G9_DIR/secrets/admin); echo PHOTOPRISM_DATABASE_PASSWORD=\$(cat $G9_DIR/secrets/dbpass); } > $G9_DIR/secrets/photoprism.env' && sudo chown root:root $G9_DIR/secrets/photoprism.env"