Blog of René Jochum

Blogging about Programming, Security, Linux, Networking and Web Apps.

Using httrack on a Webserver without beeing able to install it

In this post I assume you try to run on httrack on a GNU/Linux box without the permissions to install it via the package Manager.

A friend of mine has an older Drupal site, as its older and does not run with newer PHP Versions we decided to create a static archive of it and serve that to the end users.

So we need to copy httrack and its dependencies to the Webserver and run it there with a LD_LIBRARY_PATH env var.

Install httrack on your own box:

apt install httrack

See which binary and libraries have been installed

dpkg -L httrack
dpkg -L libhttrack2

Copy httrack and libhttrack2 to your shared webhost

scp /usr/bin/httrack <user>@<host>:~/
scp /usr/lib/libhttrack.so.2.0.49 <user>@<host>:~/
ssh <user>@<host>
ln -s libhttrack.so.2.0.49 libhttrack.so.2

Now you should be able to run httrack with the LD_LIBRARY_PATH environment variable


This is my complete commandline I came up after a while

LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH ./httrack hopeandmore.at -mirror -O "$PWD/www/hopeandmore.at/hopeandmore" -%v -K0 --disable-security-limits --max-rate=12500000 -c24

Help output of httrack