there are post installation scripts ( postinst ) in the debian folder. They will exist as postinst.ex, make sure you remove the extension .ex. insert a command like this in it chown -R user <package_path> that should give the ownership of the package folder to the "user" user that will be exectuing the process.
#DEBHELPER# chown -R user /home/opt/myapp exit 0