Hassbian configuration files permission issue

Hello there,
i have hassbian installed and working with ‘pi’ user on it.
My main machine is a mac (so no WinSCP) and i use Cyberduck and native ssh client in the terminal to access and update configuration files on hassbian.

Now, i notice a following problematic pattern, here is an example with scripts.yaml:

  • i remove file (scripts.yalm) as pi user and restart HA. Then from HA using UI i create a simple script. This creates a new file. However, when i try to edit it it say there is enough permission. I can remove that file, though.
  • when i remove it and create a new one then HA seems to be unable to update it from UI. When i click save nothing happens and no changes saved in the file.

That is only relevant to a couple of files: scripts.yaml and known_devices.yaml. Automation.yaml can be updated from HA UI and me editing it through cyberduck.

I wonder what commands can i use to change permission to these problematic files so both me and UI can write into them?

Thanks,
Alex

You need to switch to homeassistant user to edit the configuration files. See
https://www.home-assistant.io/docs/installation/hassbian/common-tasks/#edit-the-home-assistant-configuration

thanks for the link @gpbenton
Not sure i can do this in Cyberduck though? I don’t think there is a way to change user there.
I could’ve connected using homeassistant user but not sure what the password is. How can i recover/change it and is it safe to do so?

Thanks,
Alex

add your ‘pi’ user to the permissions for your homeassistant files:

sudo setfacl -R -m u:pi:rwx /home/homeassistant/.homeassistant

the above is assuming the location of your home assistant config files is “/home/homeassistant/.homeassistant”. If not adjust it accordingly.

Thanks @finity, when i run it i get
sudo: setfacl: command not found

i googled it and tried this to install acl:
yum install acl -y
but got this error:
-bash: yum: command not found

Any idea how can i fix the permissions?

Thanks,
Alex

you need to use apt-get to install packages on raspbian instead of yum.

“sudo apt-get install…” should allow you to install things.

1 Like