Cant write file: "Read-only file system..."

When i try to save a snapshot from my doorbell i get following error despite the ownership of the folder belongs to the hass user and group and the permission are as well set to: +rwx
There is enough space on the device and other users can write to the filesystem as well without a problem.

How can i debug further more why I cant save the snapshot?

The error message reads as following:

Can’t write image to file: [Errno 30] Read-only file system: ‘/opt/media/recordings/doorbell/snapshot-doorbell.jpg’

It’s installed on an archlinux with the current version: 2024.12.5-1

Best John

Hi JohnBest,

Ya, that’s not allowed there.

Try the /configt/www or /homeassistant/www, depending on which one you see. That is usually read/writable.

If you want to know more search the HA docs for info about
/local folder linking and
/media_source linking.

Hi @Sir_Goodenough
Thanks for the answer. I tried it but it still didn’t work. My configuration.yaml now looks like this:

homeassistant:
  allowlist_external_dirs:
    - "/opt/media"
    - "/var/lib/hass/www"
    - "/var/lib/hass/www/doorbell"
  media_dirs:
    media: /opt/media
    www: /var/lib/hass/www

but i get now the following errors:

ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Error for call_service at pos 1: Cannot write `/var/lib/hass/www/doorbell/snapshot-doorbell.jpg`, no access to path; `allowlist_external_dirs` may need to be adjusted in `configuration.yaml`
ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [133117633236560] Error handling message: Cannot write `/var/lib/hass/www/doorbell/snapshot-doorbell.jpg`, no access to path; `allowlist_external_dirs` may need to be adjusted in `configuration.yaml` (home_assistant_error) User from <IP> <Browser Info>
ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Error for call_service at pos 1: Cannot write `/var/lib/hass/www/doorbell/snapshot-doorbell.jpg`, no access to path; `allowlist_external_dirs` may need to be adjusted in `configuration.yaml`
ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [138733259416496] Error handling message: Cannot write `/var/lib/hass/www/doorbell/snapshot-doorbell.jpg`, no access to path; `allowlist_external_dirs` may need to be adjusted in `configuration.yaml` (home_assistant_error) User from <IP> <Browser Info>
ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Error for call_service at pos 1: Cannot write `/var/lib/hass/www/doorbell/snapshot-doorbell.jpg`, no access to path; `allowlist_external_dirs` may need to be adjusted in `configuration.yaml`
ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [136601675416624] Error handling message: Cannot write `/var/lib/hass/www/doorbell/snapshot-doorbell.jpg`, no access to path; `allowlist_external_dirs` may need to be adjusted in `configuration.yaml` (home_assistant_error) User from <IP> <Browser Info>
ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Error for call_service at pos 1: Cannot write `/var/lib/hass/www/doorbell/snapshot-doorbell.jpg`, no access to path; `allowlist_external_dirs` may need to be adjusted in `configuration.yaml`
ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [129471062630048] Error handling message: Cannot write `/var/lib/hass/www/doorbell/snapshot-doorbell.jpg`, no access to path; `allowlist_external_dirs` may need to be adjusted in `configuration.yaml` (home_assistant_error) User from <IP> <Browser Info>
ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Error for call_service at pos 1: Cannot write `/var/lib/hass/www/snapshot-doorbell.jpg`, no access to path; `allowlist_external_dirs` may need to be adjusted in `configuration.yaml`
ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [129471062630048] Error handling message: Cannot write `/var/lib/hass/www/snapshot-doorbell.jpg`, no access to path; `allowlist_external_dirs` may need to be adjusted in `configuration.yaml` (home_assistant_error) User from <IP> <Browser Info>
ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Error for call_service at pos 1: Cannot write `/www/snapshot-doorbell.jpg`, no access to path; `allowlist_external_dirs` may need to be adjusted in `configuration.yaml`
ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [129471062630048] Error handling message: Cannot write `/www/snapshot-doorbell.jpg`, no access to path; `allowlist_external_dirs` may need to be adjusted in `configuration.yaml` (home_assistant_error) User from <IP> <Browser Info>
ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Error for call_service at pos 1: Cannot write `www/snapshot-doorbell.jpg`, no access to path; `allowlist_external_dirs` may need to be adjusted in `configuration.yaml`
ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [129471062630048] Error handling message: Cannot write `www/snapshot-doorbell.jpg`, no access to path; `allowlist_external_dirs` may need to be adjusted in `configuration.yaml` (home_assistant_error) User from <IP> <Browser Info>
ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Error for call_service at pos 1: Cannot write `snapshot-doorbell.jpg`, no access to path; `allowlist_external_dirs` may need to be adjusted in `configuration.yaml`
ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [129471062630048] Error handling message: Cannot write `snapshot-doorbell.jpg`, no access to path; `allowlist_external_dirs` may need to be adjusted in `configuration.yaml` (home_assistant_error) User from <IP> <Browser Info>

Thanks @Sir_Goodenough for all the links and i read them carefully. But I still don’t know why i get the error Messages or what would be the correct configuration or place to store the snapshots…