I think this is not the best solution, although it allows for a quick and easy installation it also does not show the user what it does or where it might go wrong. I agree with Stefano that a instruction in the wiki is preferable, IMHO even as a step by step instruction.
I think the permissions for the configuration files and /opt/knowledgeTree/var can be more restrictive ...
I also wonder why you are creating a separate user for your script with such broad permissions ...
I have to work them out ... Maybe someone can help me ?
Thats because I dont know the mysql-root password for the setup-wizzard.
I already suggested them to you, normally 755 would do, but perhaps even more restrictive (644) does also work.
You don´t need to the password is automatically supplied by some magix on SME Server when logged in as root.