No access to path! ERROR

Hello,

I run into problems when I want to save a camera picture to the www folder.
I am running hassio 70.1.
I get this error:

2018-06-06 12:32:35 ERROR (MainThread) [homeassistant.components.camera] Can't write /local/test.jpg, no access to path!

I read a lot on other posts, but I can`t get it to work, has someone an idea what I am doing wrong?

I have a camera set up in the configuration file:
The URL is to a snapshot of the current camera video.

camera:
  - platform: mjpeg
    name: dafang_picture
    mjpeg_url: https://[IP-Address]/cgi-bin/currentpic.cgi
    username: username
    password: password

This automation should take a snapshot when a random 433MHz Code is received (just to trigger it simple):

- alias: notify_1_xiaomi_dafang_1_send_picture
  initial_state: True
  hide_entity: False
  trigger:
    - platform: state
      entity_id: 
        - sensor.r433_mhz_random_code
  action:
    - service: camera.snapshot
      data:
        entity_id: camera.dafang_picture
        filename: '/local/test.jpg'

I have also whitelisted the www folder like this:

homeassistant:
  whitelist_external_dirs:
    - /config/www

The filename though is /config/www/test.jpg :wink:

Thank you, I will try that when I am at my setup.
I think I might tried this already, but not sure anymore, I tried so many different forms by now.
I also tried it like this as mentioned in the documentation:

filename: 'http://[IP-Address]:8123/local/test.jpg'

**Hosting files**

  If you want to use Home Assistant to host or serve static files then create a directory 
called www under the configuration path (/config on Hass.io, .homeassistant elsewhere). 
The static files in www/ can be accessed by the following URL http://your.domain:8123/local/, 
for example audio.mp3 would be accessed as http://your.domain:8123/local/audio.mp3.

It’s definitely /www when you are saving from HA but /local when reading from outside the network.

Thanks. It finally works.
Now I am able to take a snapshot and send it with telegram to my phone.

filename: '/config/www/xiaomi_dafang_1/test.jpg'