in reply to Re^2: How do I allow my test script to get rsync to archive file ownership?
in thread How do I allow my test script to get rsync to archive file ownership?

I don't get this. Why don't you upload as the user who should be owning the files in the end? That way you won't need root and won't need rsync to change the ownership at all.

Replies are listed 'Best First'.
Re^4: How do I allow my test script to get rsync to archive file ownership?
by nysus (Parson) on Jan 22, 2018 at 18:16 UTC

    If I have a directories with a mix of file and group ownerships, ideally, I'd like to preserve them with rsync's archive option. If I upload those files to the server from a backup without the archive option, my file and group ownerships will be lost.

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest";
    $nysus = $PM . ' ' . $MCF;
    Click here if you love Perl Monks

      Instead of trying to make rsync/tar/whatever preserve this zoo, I would try to avoid such a mix in the first place.