Try to execute the command as user openhab.
sudo -u openhab <command>
Explained in detail on a basic setup here.