summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2003-01-21 20:19:53 +0000
committerWayne Davison <wayned@samba.org>2003-01-21 20:19:53 +0000
commit660cb6a08567b62abe815e5896c0275ee3c00fb4 (patch)
treec0143c3a8dc66b26421ff208068a45d7feff2e43 /testsuite
parent4274208833454bba0c5b88da919613eef8c58600 (diff)
downloadrsync-660cb6a08567b62abe815e5896c0275ee3c00fb4.tar.gz
rsync-660cb6a08567b62abe815e5896c0275ee3c00fb4.tar.bz2
rsync-660cb6a08567b62abe815e5896c0275ee3c00fb4.zip
Chown the $TO and $FROM directories to $RSYNCD_UID:$RSYNCD_GID (if we
can, and don't fail if we can't).
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/daemon-gzip-upload.test7
1 files changed, 7 insertions, 0 deletions
diff --git a/testsuite/daemon-gzip-upload.test b/testsuite/daemon-gzip-upload.test
index 04642ac8..49ddba99 100644
--- a/testsuite/daemon-gzip-upload.test
+++ b/testsuite/daemon-gzip-upload.test
@@ -21,5 +21,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 \"$FROM/\" localhost::test-to/" "$FROM" "$TO"