csmu
(Keith John Hutchison - Ceiteach Seán Mac Úistin)
17 Ottobre 2020, 11:56pm
1
Sto riscontrando un errore di backup con
[2020-10-17 23:40:29] EXCEPTION: lib/discourse.rb:92:in `exec': tar: /var/www/discourse/public/backups/default/bringing-data-to-life-2020-10-17-234010-v20200916085541.tar: Impossibile aprire: Permesso negato
tar: Errore non recuperabile: uscita immediata
Mi sono loggato nel container, sono andato nella directory e ho confermato che l’utente root può creare file.
Ho modificato i permessi a 777 e il backup ha funzionato. Anche se si tratta di un sito privato, non mi va di lasciare permessi 777 su un link potenzialmente pubblico.
Il processo di backup viene eseguito con un utente diverso da root?
RGJ
(Richard - Communiteq)
18 Ottobre 2020, 5:59am
3
Speriamo di sì. Prova a cambiarne il proprietario con discourse.
1 Mi Piace
gerhard
(Gerhard Schlager)
18 Ottobre 2020, 9:58am
4
L’ho appena testato in un container Docker e sembra che tutto funzioni correttamente:
root@gerhard-test-app:/shared/backups/default# ls -la
total 29068
drwxr-xr-x 2 discourse www-data 4096 Oct 18 09:51 .
drwxr-xr-x 3 discourse www-data 4096 Sep 18 15:31 ..
-rw-r--r-- 1 discourse www-data 7606150 Oct 18 09:48 discourse-test-site-2020-10-18-094806-v20201009190955.tar.gz
-rw-r--r-- 1 discourse discourse 7627995 Oct 18 09:51 discourse-test-site-2020-10-18-095138-v20201009190955.tar.gz
Il primo backup è stato creato dall’interfaccia web. Il secondo è stato creato con il comando discourse backup.
/var/www/discourse/public/backups è un collegamento simbolico:
root@gerhard-test-app:/var/www/discourse/public# ls -la backups
lrwxrwxrwx 1 root root 15 Oct 18 09:42 backups -> /shared/backups