Homeassistant writing files in a way vscode can't edit them

Hi All! :wave:

I’m having a hard time getting linuxserver/homeassistant and linuxserver/code-serve to play nice. Essentially, HA always writes files to the config directory and sets perms as 644, then vscode can’t edit that file. Sometimes I use HA to edit a scene, other times I use vscode to edit that same scene in yml.

If I manually docker compose exec into a container and chmod 777 scenes.yml, then vscode can edit it, and HA can read that change just fine. It seems to be that HA is writing things in a way vscode can’t read.

I’ve tried both with and without the PGID/PUID env vars. The below docker compose is just the latest iteration.

Here’s my docker config - any ideas? Thanks!

version: "3.9"
services:
  homeassistant:
    image: linuxserver/homeassistant:2022.7.6
    restart: always
    privileged: true
    network_mode: "host"
    environment:
      PGID: 1000
      PUID: 1000
      TZ: America/New_York
    volumes:
      - hadata:/config

  vscode:
    image: linuxserver/code-server:4.5.0
    restart: always
    ports:
      - 8443:8443
    environment:
      DEFAULT_WORKSPACE: /homeassistant
      PGID: 1000
      PUID: 1000
      TZ: America/New_York
    volumes:
      - hadata:/homeassistant

volumes:
  hadata:
    external: false

You can set the UMASK (check our readme’s), this should get around the issue for you.