From: Dobrica Pavlinusic Date: Mon, 10 Oct 2011 16:13:33 +0000 (+0200) Subject: force sane chmod on incoming files X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=9f0677582eb179f588243606393b670168efecb9;p=cloudstore.git force sane chmod on incoming files --- diff --git a/rsync-piper.pl b/rsync-piper.pl index 1fe8ebe..09e928b 100755 --- a/rsync-piper.pl +++ b/rsync-piper.pl @@ -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 --- 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/"