 +exec_and_log "ssh $DST_HOST chmod ug+w,o-rwx $DST_PATH"
  
 diff --git a/src/mad/sh/scripts_common.sh b/src/mad/sh/scripts_common.sh
-index 3127108..9ab2bf4 100755
+index 3d59047..6ac998e 100755
 --- a/src/mad/sh/scripts_common.sh
 +++ b/src/mad/sh/scripts_common.sh
 @@ -32,6 +32,9 @@ SED=/bin/sed

 
 # Used for log messages
 SCRIPT_NAME=`basename $0`
@@ -117,3 +120,19 @@ function timeout_exec_and_log
         exit $CMD_CODE
     fi
 }

 
 
diff --git a/src/tm_mad/nfs/tm_ln.sh b/src/tm_mad/nfs/tm_ln.sh
index 1a3578e..e0254dc 100755
--- a/src/tm_mad/nfs/tm_ln.sh
+++ b/src/tm_mad/nfs/tm_ln.sh
@@ -39,7 +39,7 @@ DST_DIR=`dirname $DST_PATH`
 log "Creating directory $DST_DIR"
 exec_and_log "mkdir -p $DST_DIR" \
     "Could not create directory $DST_DIR"
-exec_and_log "chmod a+w $DST_DIR"
+exec_and_log "chmod ug+w,o-rwx $DST_DIR"
 
 log "Link $SRC_PATH"
 exec_and_log "ln -s $SRC_PATH $DST_PATH"
diff --git a/src/tm_mad/nfs/tm_mkimage.sh b/src/tm_mad/nfs/tm_mkimage.sh
index b30c0ff..f83be45 100755
--- a/src/tm_mad/nfs/tm_mkimage.sh
+++ b/src/tm_mad/nfs/tm_mkimage.sh
@@ -42,5 +42,5 @@ exec_and_log "$DD if=/dev/zero of=$DST_PATH bs=1 count=1 seek=${SIZE}M" \
     "Could not create image $DST_PATH"
 exec_and_log "$MKFS -t $FSTYPE -F $DST_PATH" \
     "Unable to create filesystem $FSTYPE in $DST_PATH"
-exec_and_log "chmod a+rw $DST_PATH"
+exec_and_log "chmod ug+rw,o-rwx $DST_PATH"
 
diff --git a/src/tm_mad/nfs/tm_mkswap.sh b/src/tm_mad/nfs/tm_mkswap.sh
index 58b1e28..c44e3a8 100755
--- a/src/tm_mad/nfs/tm_mkswap.sh
+++ b/src/tm_mad/nfs/tm_mkswap.sh
@@ -37,7 +37,7 @@ DST_DIR=`dirname $DST_PATH`
 
 log_debug "Creating directory $DST_DIR"
 exec_and_log "mkdir -p $DST_DIR"
-exec_and_log "chmod a+w $DST_DIR"
+exec_and_log "chmod ug+w,o-rwx $DST_DIR"
 
 log_debug "Creating ${SIZE}Mb image in $DST_PATH"
 exec_and_log "$DD if=/dev/zero of=$DST_PATH bs=1 count=1 seek=${SIZE}M" \
@@ -47,5 +47,5 @@ log_debug "Initializing swap space"
 exec_and_log "$MKSWAP $DST_PATH" \
     "Could not create swap on $DST_PATH"
 
-exec_and_log "chmod a+w $DST_PATH"
+exec_and_log "chmod ug+w,o-rwx $DST_PATH"
 
diff --git a/src/tm_mad/ssh/tm_clone.sh b/src/tm_mad/ssh/tm_clone.sh
index 71800d1..e26b8cf 100755
--- a/src/tm_mad/ssh/tm_clone.sh
+++ b/src/tm_mad/ssh/tm_clone.sh
@@ -43,19 +43,51 @@ log "Creating directory $DST_DIR"
 exec_and_log "$SSH $DST_HOST mkdir -p $DST_DIR" \
     "Error creating directory $DST_DIR"
 
-case $SRC in
-http://*)
-    log "Downloading $SRC"
-    exec_and_log "$SSH $DST_HOST $WGET -O $DST_PATH $SRC" \
-        "Error downloading $SRC"
-    ;;
-
-*)
-    log "Cloning $SRC"
-    exec_and_log "$SCP $SRC $DST" \
-        "Error copying $SRC to $DST"
-    ;;
-esac
-
-exec_and_log "$SSH $DST_HOST chmod a+rw $DST_PATH"
+function _download_and_extract () {
+    case $SRC in
+    http://*.gz|https://*.gz)
+        log "Downloading GZip archive $SRC"
+        exec_and_log "download_and_extract $SRC $DST_PATH.gz $GUNZIP $DST_HOST" \
+            "Error downloading $SRC"
+        ;;
+
+    http://*.bz2|https://*.bz2)
+        log "Downloading BZip2 archive $SRC"
+        exec_and_log "download_and_extract $SRC $DST_PATH.bz2 $BUNZIP2 $DST_HOST" \
+            "Error downloading $SRC"
+        ;;
+
+    http://*|https://)
+        LOCATION=$(python2.6 $(which stratus-manifest) --get-element location $SRC)
+        rc=$?
