Chown the $TO and $FROM directories to $RSYNCD_UID:$RSYNCD_GID (if we
[rsync/rsync.git] / testsuite / daemon-gzip-upload.test
CommitLineData
271f87e5
MP
1#!/bin/sh
2
3# Copyright (C) 2001, 2002 by Martin Pool <mbp@samba.org>
4
5# This program is distributable under the terms of the GNU GPL (see
6# COPYING)
7
8# We don't really want to start the server listening, because that
9# might interfere with the security or operation of the test machine.
10# Instead we use the fake-connect feature to dynamically assign a pair
11# of ports.
12
13# This test tries to upload a file over a compressed connection to the
14# server. This ought to exercise (exorcise?) a bug in 2.5.3.
15
16. "$suitedir/rsync.fns"
17
18build_rsyncd_conf
19
06464f55 20RSYNC_CONNECT_PROG="$RSYNC --config=$conf --daemon"
271f87e5
MP
21export RSYNC_CONNECT_PROG
22
23hands_setup
660cb6a0
WD
24
25# If we are root, we must allow the rsyncd process (which runs under
26# a different uid/gid) to write to the destination directory. Source
27# directory must be chown'ed as well so that UIDs & GIDs match when
28# the source & destination are compared after copying.
29chown -R $RSYNCD_UID:$RSYNCD_GID "$FROM" "$TO" 2>/dev/null || true
30
06464f55 31checkit "$RSYNC -avvz \"$FROM/\" localhost::test-to/" "$FROM" "$TO"
271f87e5 32