From: Silvio Rhatto Date: Wed, 28 Aug 2013 19:45:55 +0000 (-0300) Subject: Fix permissions twice X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=4dbfa3ae61d577a9506b28a6ae250618767ce941;p=httruta.git Fix permissions twice --- diff --git a/lib/httracker/functions b/lib/httracker/functions index 929d917..5c45f9b 100644 --- a/lib/httracker/functions +++ b/lib/httracker/functions @@ -52,6 +52,11 @@ function httracker_get { # Get each URL httrack ${OPTS} ${url} | tee $LOG + # Fix permissions again + if [ "`whoami`" != "$USER" ] && [ "`whoami`" == "root" ]; then + chown -R $USER.$GROUP $TARGET/ + fi + if [ "$?" == "0" ]; then # Mark as downloaded touch $TARGET/httracker-ok @@ -80,6 +85,11 @@ function httracker_get_incremental { # Grab URLs from the network httrack ${OPTS} --list ${URLS} | tee $LOG + + # Fix permissions again + if [ "`whoami`" != "$USER" ] && [ "`whoami`" == "root" ]; then + chown -R $USER.$GROUP $TARGET/ + fi } # Get SemanticScuttle parameter