aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/httracker/functions10
1 files changed, 10 insertions, 0 deletions
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