From ef6f5fd89ab02c410c08a8d5a1b92653cc38324d Mon Sep 17 00:00:00 2001
From: Mirko Tietgen <mirko@abunchofthings.net>
Date: Sun, 19 Jul 2015 17:16:12 +0200
Subject: [PATCH] Bug 14564 -- Export configuration: Unfortunately, no backups
 are available

Configuration files are not shown in the export data tool due to file
ownership/ permissions.

Test plan:

To reproduce:
- check file permissions on the server in /var/spool/koha/sitename/
  config files have root:root and 600
- try to use the export tool to download configuration files: they
  are not available

Then
- apply patch
- use koha-dump
- check file permissions for config files, should be root:$site-koha
  and 640 now
- try to use the export tool to download configuration files: they
  should be available for download now
---
 debian/scripts/koha-dump |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/debian/scripts/koha-dump b/debian/scripts/koha-dump
index bf4bd5f..a07b554 100755
--- a/debian/scripts/koha-dump
+++ b/debian/scripts/koha-dump
@@ -65,5 +65,6 @@ tar -C / -czf "$metadump" \
     "etc/apache2/sites-enabled/$instancefile" \
     "var/lib/koha/$name" \
     "var/log/koha/$name"
-
+chown "root:$name-koha" "$metadump"
+chmod g+r "$metadump"
 echo "Done."
-- 
1.7.10.4