Upgrading Hass Install on a Raspberry 3-This worked for me

For anyone trying to upgrade their Home Assistant manual install on a Raspberry Pi3 and used this installation method https://www.home-assistant.io/docs/installation/raspberry-pi/ and are experiencing permissions issues the following worked for me.

sudo systemctl stop homeassistant.service
sudo chown homeassistant:homeassistant -R /srv/homeassistant/
sudo su -s /bin/bash homeassistant
source /srv/homeassistant/bin/activate
pip3 install --upgrade homeassistant
exit
sudo reboot now

I found this method in a number of earlier posts but it didn’t specifically mention a reference to what method Home Assistant was installed in the first place

Hope it’s of use to anyone struggling to update