Home Assistant Community

Editing configuration.yaml - permission denied

#1

I am trying to edit the file for the first time and when I try to save I get the following error:

Error opening file ‘/usr/share/hassio/homeassistant/configuration.yaml’: Permission denied
The file on disk may now be truncated!

What I did so far:

  • Give the file write permission via sudo chmod 664 /usr/share/hassio/homeassistant/configuration.yaml
  • Attempt to add my user, pi, to the sudo group via: sudo usermod -aG sudo pi

I am still not able to edit the file and now when I open it, it appears empty. So I somehow managed to delete its contents apparently, but still can’t save it.

What am I doing wrong here?

Edit: Now I am also getting the “inode / x-corrupted” error.
Edit 2: sudo chown pi /usr/share/hassio/homeassistant/configuration.yaml also didn’t work.

0 Likes

#2

What setup do you have? Hassio ? Hassbian?

0 Likes

#3

Hass.io on rasbian stretch.

0 Likes

#4

Have you installed the samba add-on?

0 Likes

#5

@GaryK no, I am using Mac. Would it help on a mac? I thought it would be easier to work directly on the pi, but I guess not.

0 Likes

#6

mac does samba. I had permission issues editing files on the host. I think this is to protect us from ourselves. No problem editing via samba.

0 Likes