I uninstalled standard rtorrent from my 10.04 ubuntu server and ran your script in order to get web access to rtorrent. It appeared to work.

rtorrent runs and the web interface is accessable...