aboutsummaryrefslogtreecommitdiff
path: root/lib/httracker
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-08-28 16:45:55 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-08-28 16:45:55 -0300
commit4dbfa3ae61d577a9506b28a6ae250618767ce941 (patch)
treeb11eb53a156f53464ec9d0ae081a8fe46acafe9a /lib/httracker
parent10d074428ab83b31289939ae4705e791d82f8982 (diff)
downloadhttruta-4dbfa3ae61d577a9506b28a6ae250618767ce941.tar.gz
httruta-4dbfa3ae61d577a9506b28a6ae250618767ce941.tar.bz2
Fix permissions twice
Diffstat (limited to 'lib/httracker')
-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