From b2bd6c1b7a2b764ad2c99e244a940b2b875f8de5 Mon Sep 17 00:00:00 2001 From: Mirko Tietgen Date: Mon, 16 Nov 2020 22:24:22 +0000 Subject: [PATCH] Bug 14564: Set permissions on configuration backups This patch sets the group and group read permissions on configuration backups, so that they can be downloaded via the web staff interface. Test plan: 0. Apply the patch 1. cp debian/scripts/koha-dump /usr/sbin/koha-dump 2. koha-run-backups --days 2 --output /var/spool/koha 3. Note *.tar.gz backups in /var/spool/koha/kohadev now have root:kohadev-koha ownership and 640 permissions 4. vi /etc/koha/sites/kohadev/koha-conf.xml 5. Set backup_db_via_tools and backup_conf_via_tools to 1 6. echo 'flush_all' | nc -q 1 memcached 1121 7. koha-plack --restart kohadev 8. Go to http://localhost:8081/cgi-bin/koha/tools/export.pl 9. Click on "Export configuration" 10. Choose a file 11. Click Download configuration 12. Note that *.tar.gz file downloaded correctly Signed-off-by: David Cook --- debian/scripts/koha-dump | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/scripts/koha-dump b/debian/scripts/koha-dump index 707a8dfe05..e654a00a56 100755 --- a/debian/scripts/koha-dump +++ b/debian/scripts/koha-dump @@ -95,6 +95,8 @@ dump_instance() "etc/apache2/sites-enabled/$instancefile" \ "var/lib/koha/$name" \ "var/log/koha/$name" + chown "root:$name-koha" "$metadump" + chmod g+r "$metadump" [ "$quiet" = "no" ] && echo "Done." } -- 2.11.0