pajikos / home-assistant-helm-chart

Helm Chart for Home Assistant
MIT License
116 stars 32 forks source link

Code server user does not have permissions to modify files #80

Open njgrisafi opened 1 month ago

njgrisafi commented 1 month ago

Launching a fresh instance with the code server results in permissions denied errors when trying to modify files.

When looking at the file system the owner and group of /config is root. Is this intended?

njgrisafi commented 1 month ago

Using podSecurityContext as root user seems to fix the issue for me

podSecurityContext:
  runAsUser: 0
  runAsGroup: 0
pajikos commented 1 month ago

I am running with this configuration to avoid running as root:

podSecurityContext:
  runAsUser: 1000
  runAsGroup: 1000
  fsGroup: 1000
  fsGroupChangePolicy: "OnRootMismatch"

You are correct. The code server now uses UID 1000, while Home Assistant uses UID 0 in the default configuration, and they do not work together. I will try to think about how to solve this issue in the current Helm template without breaking any existing installations.