Get rid of gensend target & cached git version.
[rsync.git] / testsuite / chmod.test
blob1646a9c81f27f7cd7ed29f1004786e1bbe39957a
1 #!/bin/sh
3 # Copyright (C) 2004-2022 Wayne Davison
5 # This program is distributable under the terms of the GNU GPL (see
6 # COPYING).
8 # Test that various read-only and set[ug]id permissions work properly,
9 # even when using a --temp-dir option (which we try to point at a
10 # different filesystem than the destination dir).
12 . "$suitedir/rsync.fns"
14 hands_setup
16 chmod 440 "$fromdir/text"
17 chmod 500 "$fromdir/dir/text"
18 e="$fromdir/dir/subdir/foobar.baz"
19 chmod 6450 "$e" || chmod 2450 "$e" || chmod 1450 "$e" || chmod 450 "$e"
20 e="$fromdir/dir/subdir/subsubdir/etc-ltr-list"
21 chmod 2670 "$e" || chmod 1670 "$e" || chmod 670 "$e"
23 # First a normal copy.
24 runtest "normal copy" 'checkit "$RSYNC -avv \"$fromdir/\" \"$todir\"" "$fromdir" "$todir"'
26 # Then we update all the files.
27 runtest "update copy" 'checkit "$RSYNC -avvI --no-whole-file \"$fromdir/\" \"$todir\"" "$fromdir" "$todir"'
29 # The script would have aborted on error, so getting here means we've won.
30 exit 0