Access external HD directory to record from ipcam

Hi everyone, I have RP4 with HA CORE installed via docker container. I would like to use the camera.record action to record from an IP-cam, on an external HD connected to the RPI4, but it gives me the following error:

Impossibile eseguire l'azione: camera.record Can't write /export/nas_5tb/ipcam_movies/prova.mp4, no access to path!

I add the following to the configuration.yaml file:

homeassistant:
  whitelist_external_dirs:
    - /export/nas_5tb/ipcam_movies

but when I restart HA it gives me the following error:

`The system cannot restart because the configuration is not valid: Invalid config for 'homeassistant' at configuration.yaml, line 23: Not a directory 'whitelist_external_dirs->0', got '/export/nas_5tb/ipcam_movies'

In the docker-compose.yaml file added the following below the home-assistant block:

services:
  home-assistant:
  ...
  volumes:
    ...
    - ~/homeassistant/.homeassistant/media:/media
    - /export/nas_5tb/ipcam_movies:/ipcam_movies

I don’t know how to proceed. Could anyone help me? Thank you.