From 53bc0894ec9d955b720fa919bcffebe6dbe6ef25 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sat, 4 Aug 2012 14:33:30 +0200 Subject: [PATCH] Bug 22143 - Fix permission and owner of configuration backups This allows backups created using Debian package to show up automatically in web interface and makes permissions of backup files consistent. Signed-off-by: Magnus Enger Original patch by Dobrica Pavlinusic. Moved from Bug 8437 by me. Tested thusly: - Look at backup files in /var/spool/koha// - Notice that permissions for .tar.gz files are -rw------- - Notice ownership of .tar.gz files are root:root - Apply this patch - Make sure the changes in the patch are applied to the script you run when you run "sudo koha-dump". This might include copying debian/scripts/koha-dump to /usr/sbin/koha-dump, if you are on a gitified setup. - Run the modified koha-dump - Notice that both backup files dated today are now -rw-r----- and ownership is root:-koha For extra testing credit: Set 1 in koha-conf.xml and verify that no files are listed under Tools > Export > Export configuration initially. After patching and running koha-dump the .tar.gz with the current date should show up. --- debian/scripts/koha-dump | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/scripts/koha-dump b/debian/scripts/koha-dump index ff171a0551..570dc052d4 100755 --- a/debian/scripts/koha-dump +++ b/debian/scripts/koha-dump @@ -92,6 +92,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