Browse Source

Make sure that restoration script sets correct rights on files

These changes ensure that, no matter if migrating from a online instance or importing some other Zammad-Export, that the filesystem rights on the Zammad-Directory are always correct.

We're using fixed user "zammad" here, the Backup-Documentation needs enhancement and will hold a warning for this to ensure, other users don't crash here.
MrGeneration 6 years ago
parent
commit
e6697cdd21
1 changed files with 2 additions and 0 deletions
  1. 2 0
      contrib/backup/functions

+ 2 - 0
contrib/backup/functions

@@ -155,6 +155,8 @@ function stop_zammad () {
 function restore_zammad () {
   echo "# Restoring Files"
   tar -C / --overwrite -xzf ${BACKUP_DIR}/${RESTORE_FILE_DATE}_zammad_files.tar.gz
+  echo "# Ensuring correct file rights ..."
+  chown -R zammad:zammad ${ZAMMAD_DIR}
 
   if [ "${DB_ADAPTER}" == "postgresql" ]; then
     echo "# Restoring PostgrSQL DB"