pais_tm
(Tiago Pais)
February 25, 2023, 7:21pm
1
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
nickrout
(Nick Rout)
February 26, 2023, 2:30am
2
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
pais_tm
(Tiago Pais)
February 26, 2023, 11:39am
3
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
nickrout
(Nick Rout)
February 27, 2023, 3:13am
4
what user are you using on the pi?
nickrout
(Nick Rout)
February 27, 2023, 6:52pm
6
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.
pais_tm
(Tiago Pais)
February 27, 2023, 6:55pm
7
My prefered action would be changing the permissions but I m not sure if I know how to do that…?
nickrout
(Nick Rout)
February 27, 2023, 6:57pm
8
You need to get familiar with chown and chmod.
pais_tm
(Tiago Pais)
February 27, 2023, 7:14pm
9
Ok will try to find out. Thanks
pais_tm
(Tiago Pais)
February 27, 2023, 9:00pm
10
sudo chown "barraco:barraco " /root/“barraco”/homeassistant/ -R
sudo chmod g+rwx “root/homeassistant” - R
Would it be something like this?
nickrout
(Nick Rout)
February 27, 2023, 9:09pm
11
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.
pais_tm
(Tiago Pais)
February 27, 2023, 9:31pm
12
I’m not sure I understand what you’ trying to say? If with this I can edit the configuration.yaml I’ll be happy