Permissions for ./root/homeassistant/config in Container

Hi everyone,
I have HA on a container in Raspberry Pi and I can’t get to my config.yaml file because I dont seem to have permission to get to ./root

I installed it as indicated in HA webpage
Any ideas?

Thank you and sorry for the probably stupid qustion

I assume you ran

docker run -d \
  --name homeassistant \
  --privileged \
  --restart=unless-stopped \
  -e TZ=MY_TIME_ZONE \
  -v /PATH_TO_YOUR_CONFIG:/config \
  --network=host \
  ghcr.io/home-assistant/home-assistant:stable

So what did you type instead of /PATH_TO_YOUR_CONFIG

Hi,
it was some time ago so i’m not really sure but I know that my configuration file is at:
/root/homeassistant/config/configuration.yaml
and then I have also something at:
./var/lib/docker/overlay2/1e92ab088e8e70fb464e7d5fc5b4317fa75f764f04987cc79032bd7ab4b83b8d/merged/usr/src/homeassistant/.pre-commit-config.yaml

EDIT: But I can’t access either of them…working from the raspberry itself

what user are you using on the pi?

Barraco@raspeberrypi

Well you’ll need to use sudo, change to the root user or change the permissions to allow that user to read and write those files.

My prefered action would be changing the permissions but I m not sure if I know how to do that…?

You need to get familiar with chown and chmod.

Ok will try to find out. Thanks

sudo chown "barraco:barraco " /root/“barraco”/homeassistant/ -R

sudo chmod g+rwx “root/homeassistant” - R

Would it be something like this?

Something like that yes, but I think on refleection that HA may change things back when you edit a file in the gui, or it creates a new file.

I’m not sure I understand what you’ trying to say? If with this I can edit the configuration.yaml I’ll be happy :blush: