Permission denied (openhab2, winSCP)

Hey guys,
not having permissions to do something is a pretty normal situation. The solution is always the same: Check the active permissions, then correct or work around them.

  1. Which user are you accessing the system with?
  2. Who is the file/folder you are trying to access owned by?
  3. Does your user have the correct permissions to read and/or write the location you are interested in?

With the latest revision of openHABian all you should need to do in order to be allowed to write to /etc/openhab2 and /var/lib/openhab2 is execute “Fix Permissions” from inside the openHABian Configuration Tool, so be sure to do that first.
You can by the way work easier by mounting the samba share, no need for winSCP in a local network. Check out the new “openHAB-share” share, you’ll like it.

Also remember that it’s totally normal that the main user doesn’t have permissions to do everything. That would be a security concern and that’s what sudo is for. You can copy files to the users home for example, then move them via SSH and mv. be sure to fix permissions afterwards, so openHAB can write to the files…

Tutorial: https://www.digitalocean.com/community/tutorials/an-introduction-to-linux-permissions