3 # This program is distributable under the terms of the GNU GPL (see
6 # Test that rsync handles basic ACL preservation.
8 . $srcdir/testsuite/rsync.fns
10 $RSYNC --version | grep ", ACLs" >/dev/null || test_skipped "Rsync is configured without ACL support"
13 *protocol=29*) test_skipped "ACLs require protocol 30" ;;
16 case "$setfacl_nodef" in
17 true) test_skipped "I don't know how to use your setfacl command" ;;
20 makepath "$fromdir/foo"
21 echo something >"$fromdir/file1"
22 echo else >"$fromdir/file2"
24 files='foo file1 file2'
26 setfacl -m u:0:7 "$fromdir/foo" || test_skipped "Your filesystem has ACLs disabled"
27 setfacl -m u:0:5 "$fromdir/file1"
28 setfacl -m u:0:5 "$fromdir/file2"
30 $RSYNC -avvA "$fromdir/" "$todir/"
33 getfacl $files >"$scratchdir/acls.txt"
36 getfacl $files | diff $diffopt "$scratchdir/acls.txt" -
38 # The script would have aborted on error, so getting here means we've won.