Media_dirs not working

Issue: NAS-mounted folder does not show up in Media browser, and unable to trigger camera.record on it via DevTools.

HA info:

# ha info
arch: amd64
channel: stable
docker: 28.3.3
features:
- reboot
- shutdown
- services
- network
- hostname
- timedate
- os_agent
- haos
- resolved
- journal
- disk
- mount
hassos: "16.3"
homeassistant: 2025.10.4
hostname: homeassistant
logging: info
machine: qemux86-64
machine_id: <something>
operating_system: Home Assistant OS 16.3
state: running
supervisor: 2025.11.1
supported: true
supported_arch:
- amd64
- i386

Config (relevant):

media_source:

homeassistant:
  media_dirs:
    reolink_cams_recordings: /media/cam_recordings

where /media/cam_recordings is NAS-mount location, is readable (see output of ls), and writable (see output of touch)

# ls media
cam_recordings  frigate
# ls cam_recordings/
videos

# touch test.mp4
# ls
test.mp4

# pwd
/mnt/data/supervisor

dev testing for camera.record:

action: camera.record
data:
  filename: /media/cam_recordings/videos/cam-front-doorbell.mp4
  duration: 15
target:
  device_id: 7de3ab6bbcff3dfe455335d6d6dc2fd7

displays error Failed to perform the action camera.record. Can’t write /media/cam_recordings/videos/cam-front-doorbell.mp4, no access to path!

Media browser also doesn’t show the location /media/cam_recordings

That’s what you named your folder, but you are trying to address it as

Much obliged, good Sir.

I’ve tried a few iterations all of which yielded the same end result. The links in your response, along with other reading materials, helped me better understand but a few gaps in my knowledge remain.

  1. Files in /media are protected by HA authorization. Retrieval will need some sort of auth token.
  2. My NFS storage is already mounted in /media/cam_recordings. No additional work is required to make it accessible (as confirmed by earlier commands).
  3. Creating a camera snapshot (instead of recording) using the /media/xyz/filename.jpg works like a charm.
action: camera.snapshot
metadata: {}
data:
  filename: /media/cam_recordings/snapshots/test.jpg
target:
  device_id: 7de3ab6bbcff3dfe455335d6d6dc2fd7
  1. local: /media mapping in media_dirs isn’t required. By default, HA seems to map anything in /media under /media/local. External mounts or other non-config folders (/config) can or should be, if required, accessed by specifying full path like so testing: /mnt/base_root/child/branch/xyz.abc for reference later in media-source or image or video etc.
  2. Sending iOS companion notification referring to the above path (but with /local suffix after /media or full url (both of which are valid per this) results either in 404 not found (for the image when displaying on device) or 401 unauthorized. Few iterations I’ve tried:
action: notify.mobile_app_device
data:
  message: Test
  data:
    image: https://<url>/media/local/cam_recordings/snaps/test.jpg

or

action: notify.mobile_app_imorik
data:
  message: Test
  data:
    image: /media/local/cam_recordings/snaps/test.jpg

or

action: notify.mobile_app_imorik
data:
  message: Test
  data:
    url: https://<url>/media/local/cam_recordings/snaps/test.jpg