summaryrefslogtreecommitdiff
path: root/regress/usr.bin/rsync/test6_perms.test
blob: c0461c2205554e352f95cb3dc50f51ebf5de56e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#! /bin/sh

. ${tstdir-.}/lib.sh
. ${tstdir-.}/conf.sh

rm -rf dir1 dir2 dir3
# make the copy-from-here tree
mkdir dir1
cd dir1
generate_tree_1
# make the tree we want to compare to
mkdir ../dir2
cd ../dir2
generate_tree_1

# Also make the target tree and mess up some permissions in there.
# We expect rsync to reset this to what dir1 has.
mkdir ../dir3
cd ../dir3
generate_tree_1
chmod 600 foo/bar/baz/one.txt
touch -m -t 199901020405 foo/bar/baz/one.txt
chmod 470 foo/bar/baz/one2.txt
touch -m -t 199901020405 foo/bar/baz/one2.txt

cd ..
$rsync -a dir1/ dir3
compare_trees dir2 dir3