Can't Edit Configuration.YAML - Permission

Hi All,
I have a Raspberry PI 3 that uses the Raspbian Jessie image. I installed Home Assistant on the OS with the All In One Installer since I have a few ZWave devices that I have purchased.

Since it is easier for me to edit the configuration file via a text editor, I am opening the configuration.yaml file with the Geany Programmer’s Editor app through the OS’ GUI.

After trying to make the below change to the file, I receive this error message

The change I was making was just an update for the Z Stick
zwave:
usb_path: /dev/ttyACM0
config_path: /srv/hass/hass_venv/lib/python3.4/site-packages/libopenzwave-0.3.1-py3.4-linux-armv7l.egg/config

Any help that can be offered to allow me to edit this file with a text editor would be greatly appreciated!

Thanks!

You are trying to edit documents owned by the HASS user. You can try adding the user you are logged in with to the hass group.

I login as pi. As a result, I have tried adding pi to the hass group by:

Changing from the pi user to hass user with the following command: sudo su - hass
Adding pi to the hass group with the following command: usermod -a -G hass pi

this command results in the following error/response:
usermod: Permission denied.
usermod: cannot lock /etc/passwd; try again letter.

I have also tried adding the pi user to hass while under the pi user with the same command (usermod -a -G hass pi)

I receive the same error response.

Any thoughts on what I am doing wrong?

Thanks.

use sudo command with user pi to add user to the hass group

You’re also going to have to give the configuration.yaml file write permissions for the hass group (as the pi user):

sudo chmod 664 configuration.yaml

Awesome! Thanks to you both: @thundergreen and @roddie.

1 Like