From 5000eddb3786d456c824d2d42919482bec7a4940 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Thu, 14 Jan 2016 22:29:07 -0800 Subject: [PATCH] Preserve unix file attributes on copy http://sourceforge.net/p/webadmin/bugs/4701/ --- cluster-copy/cluster-copy-lib.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cluster-copy/cluster-copy-lib.pl b/cluster-copy/cluster-copy-lib.pl index d05d3c4a1..f06fe1df2 100755 --- a/cluster-copy/cluster-copy-lib.pl +++ b/cluster-copy/cluster-copy-lib.pl @@ -205,6 +205,11 @@ foreach $s (@run) { else { push(@errs, [ $f, "Copy was incomplete" ]); } + + # Preserve file permissions + &remote_foreign_call($s->{'host'}, "webmin", + "set_ownership_permissions", $st[4], $st[5], + $st[2] & 0777, $dest); } # Run the post command on remote