I am on OpenHabian running on a Debian system. OH is 2.5.6.
I am trying to capture an element from an external webpage with a linux command which looks like this:
xvfb-run wkhtmltoimage --disable-javascript --width 800 --height 340 'http://ch…
The same type of command works well in a different usecase on my system - but in this specific case, I want to place the result in the config directory called html. This means that my command try to place the file (a .png image) in /etc/openhab2/html/test.png
This seem to fail when triggering the run channel for the thing with the exec binding - and when looking at the run-output it says “Permission denied”. If I try to save to /etc/openhab2/test.png it works - but then I cannot refer to it from my sitemap.
Basically what I want is, to capture something from an external URL into a png-file - and use that in my sitemap. Am I going about this wrong - or is there a reason+fix for my permission issue ?
Is the external image you’re trying to reach behind a login? Because if it is a directly accessible web asset, then the exec command setup shouldn’t be necessary. The image element for sitemaps can take a url directly.
As far as I understand your description you cannot store the image in directory /etc/openhab2/html but in /etc/openhab2/. If that is the case check the permissions of both directories
ls -ld /etc/openhab2 /etc/openhab2/html
You may have to adapt the permissions of the target directory.
Don’t you have to take user into account here? So far as the little I grasp about *nix goes, openHAB runs under adifferent username, different permissions, to the console.
this look like it would be the same permissions so it should work but …
as it did not work and there is the plus sign at the end of the permissions it looks like acls were setup for these directories and it seems that they are different.