By adding the user openhab to the respective groups i could allways solve access rights and get everything running.
Mostly its user rights, forgotten shebang, libraries in wrong folder, wrong path or somthing like this.
I don’t say the solutions are obvious but mostly they can be found. My way to get meaningfull error prompts is to always try to execute the command as usr openhab in a shell. This ensures that i can see the error prompt and that i have a bash. Whish is disabled for the openhab user.
sudo -u openhab <do something>
How to just enable sudo for a single command and some related information about openhab and sudo is explained here.