Is there any way for me to disable certain Compression Types for the unrar and .zip module?
Basically i want to allow only the type : store. The rest would cause the server cpu to load 100% if abused.
Edit: Solved it myself.
Basically,
nano /var/www/rutorrent/plugins/filemanager/scripts/archive
Then,
look for the rar) line, and search for " "$5" " . It should be in this format:
Quote
rar)
"$1" a -ep1 -m"$5" -ol "$vformat" -v"$6"- "$3" "${@:8}" | awk -F '[\b[:blank:]]+' 'BEGIN {OFS=", "} {for (i=1;i<=NF;i++) { if ((i-1)%10==0) printf "\n0: "; printf "%s ",$i} fflush()}' >> "$2/log"
printf "\n1: " >> "$tempdir/log"
;;
Change it to:
Quote
rar)
"$1" a -ep1 -m0 -ol "$vformat" -v"$6"- "$3" "${@:8}" | awk -F '[\b[:blank:]]+' 'BEGIN {OFS=", "} {for (i=1;i<=NF;i++) { if ((i-1)%10==0) printf "\n0: "; printf "%s ",$i} fflush()}' >> "$2/log"
printf "\n1: " >> "$tempdir/log"
;;
And you're good to go.
Basically, if a user selects any of the types, it defaults to the most basic, thus saving your server resources. Now i'll figure the part for .zip compression.
Edit: I can't seem to change the setting for .zip compression. If I were to remove the prefix $compression, then it defaults to the highest level of compressing. What should i do?