Whitelist_external_dirs:

I’m trying to save a snapshot from a camera to HA. In config.yaml, I have this
homeassistant:
whitelist_external_dirs:
- ‘/config/tmp’
- ‘/tmp’

I’ve created a folder \hassio\config\tmp with samba, but I get this:

Can’t write ‘/config/tmp/dafang1_20180614-232044.jpg’, no access to path!

Any idea what I’m missing is appreciated

I’m not sure, but 2 observations…

1 - it’s whitelist external directories, you shouldn’t need to list any directories from inside your configuration directory.

2 - you seem to be confusing Windows and Linux paths somewhere along the line, / for Linux, \ for windows. It may just be that you’re writing it that way because that’s how it looks in your Samba client, but it’s actually the right way round on the device at which point no issue, but if it’s like that on your device then it won’t be in the right place.

Thanks for clearifying. So I guess my question wasn’t the right one. I found a script with this line:

filename: ‘/config/tmp/dafang1_{{ now().strftime("%Y%m%d-%H%M%S") }}.jpg’

Where is this script trying to save the file? How can I direct the file to the SD card of my RPI (running Hassio)

I’m not sure with hassio tbh, but at a guess it’s a relative path, so the line in the script should be

filename: 'tmp/dafang1_{{ now().strftime("%Y%m%d-%H%M%S") }}.jpg' 

Or possibly it still needs config/ at the front, but without the leading /

Or, possibly, it needs to be /hassio/config/tmp/ etc?

No success. I guess I have to investigate where Hassio is storing files by default. But thanks a lot for being so helpful

Yeah, you’ll need to know the file/directory structure (tree) on the device, and how hassio sits within it.

I’m sure someone on here will know and point you in the right direction soon :slight_smile:

try creating a tmp dir under config and it should work.