From 4274208833454bba0c5b88da919613eef8c58600 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Tue, 21 Jan 2003 19:30:51 +0000 Subject: [PATCH] Chown the $TO and $FROM directories to $RSYNCD_UID:$RSYNCD_GID (if we can, and don't fail if we can't). --- testsuite/daemon-gzip-download.test | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/testsuite/daemon-gzip-download.test b/testsuite/daemon-gzip-download.test index b716a992..31a94f59 100644 --- a/testsuite/daemon-gzip-download.test +++ b/testsuite/daemon-gzip-download.test @@ -27,5 +27,12 @@ RSYNC_CONNECT_PROG="$RSYNC --config=$conf --daemon" export RSYNC_CONNECT_PROG hands_setup + +# If we are root, we must allow the rsyncd process (which runs under +# a different uid/gid) to write to the destination directory. Source +# directory must be chown'ed as well so that UIDs & GIDs match when +# the source & destination are compared after copying. +chown -R $RSYNCD_UID:$RSYNCD_GID "$FROM" "$TO" 2>/dev/null || true + checkit "$RSYNC -avvz localhost::test-from/ \"$TO/\"" "$FROM" "$TO" -- 2.34.1