force sane chmod on incoming files
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 10 Oct 2011 16:13:33 +0000 (18:13 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 10 Oct 2011 16:32:54 +0000 (18:32 +0200)
rsync-piper.pl
test.sh

index 1fe8ebe..09e928b 100755 (executable)
@@ -109,6 +109,8 @@ while(<$p>) {
        filter = - /.secrets - /.md5
 #      refuse options = c delete
 #      dont compress = *
+       incoming chmod = ug=rwX
+
 
 __RSYNC_MODULE__
 
diff --git a/test.sh b/test.sh
index 707577f..61ebe6f 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -27,7 +27,7 @@ cd $dir
 
 push . --recursive --delete -v
 
-if true ; then # skip tests if false
+if [ ! -z "$SKIP" ] ; then # skip tests if false
 
 ps ax > foo
 push foo -v
@@ -96,8 +96,6 @@ __SEND__
 push send dir1 dir2 .sync -rv
 
 
-fi # skip tests
-
 # test file move
 
 pending=/tmp/pending.0610201109464117
@@ -107,3 +105,12 @@ push . -rv
 mkdir -p .sync/pending
 cp $pending .sync/pending/
 push .sync -rv
+
+
+fi # skip tests
+
+ps ax > perms-test
+chmod 400 perms-test
+push -va perms-test
+
+sh -xc "ls -al ~$RSYNC_LOGIN/localhost/"