Save camara picture with wget

I can see me webcam in the sitemap with following link:

Frame label="Kamera Bild" {
   Video url="http://user:pass@" encoding="mjpeg" 
Frame label="Kamera Video" {
   Image url="http://user:pass@" refresh=50						 

Now I will save a picture with wget in the html folder, but it is not working… :frowning:
I am using following comand:

executeCommandLine("wget http://user:pass@ -O /etc/openhab2/html/" + "FOTO1_TEMP.jpg",5)

In the logfile I can not see any errors… Is there any other possibility to see if any problem exists (permission,…)?

Change the executeCommandLine to the following to see what the wget is printing out:

val results = executeCommandLine("wget http://user:pass@ -O /etc/openhab2/html/" + "FOTO1_TEMP.jpg",5000)
logInfo("Test", results)
2017-08-15 09:46:41.953 [INFO ] [.eclipse.smarthome.model.script.Test] - /etc/openhab2/html/FOTO1_TEMP.jpg: Permission denied

and now? I am using openhabian.

Store your picture somewhere else then /etc/ to which you have no write permissions (for a reason).

Cheers, David