Rclone is a great program. One of its best features for copying files on WAN links is that it is multi-threaded, which can make a tremendous difference when you have lots of small files to be copied.
However, a corresponding downside is that rclone does not preserve permissions well (or at all, for directories). There were times I found myself unable to give up the speed advantage that rclone offered, despite needing permissions to be transferred faithfully.
Here’s what I came up with. Run this after the copy is done. If the source and the destination are not on the same machine you may have to break up the pipe and use an intermediate file that you transfer from source to destination instead.
(
cd $SOURCE
find . -printf '%m\t%p\n'
) | (
cd $DESTINATION
perl -lne '
@F=split /\t/;
$F[0]=oct($F[0]);
chmod @F
'
)