Preparing for v4 to v5 upgrade - Linux User and file permissions

119 views
Skip to first unread message

mike.t...@noworries.plus.com

unread,
May 3, 2024, 11:40:22 AM5/3/24
to weewx-user
Hi,
I'm a little embarrassed to ask these most basic of questions but at least I'll get started on the right track so here goes;

I have been running Weewx on a RPI since 2104 using setup.py
It's currently v4.10.2, python 3 and on rpi4
I have made several changes to graphs, reports etc and have a few extensions installed.
Everything is under /home/weewx
I never created a weewx user I just sudo from the pi user
root owns all the files
I have no experience of running a virtual environment
Yes I have read the upgrade guide and the v5 wiki
I have searched the google group but my moist basic of questions don't look to be covered.
I did do a test upgrade of my backup rpi but although it runs at v5 the upgrade couldn't have been clean as  it wouldn't upgrade from v5.0 to v5.0.2 so I must have done something wrong in the initial upgrade.

My queries are;
i) should I create a weewx linux user and login as that use to execute the upgrade
ii) if yes, do I need to change the file ownership on all the files to weewx user
iii)  if I don't need a weewx user do I just sudo from the pi user?

Thanks in Advance
Mike

vince

unread,
May 3, 2024, 2:49:01 PM5/3/24
to weewx-user
Having a test pi is a good thing.  Definitely use that to walk through the steps and verify you know what'll happen.

I followed the https://github.com/weewx/weewx/wiki/v5-upgrade steps and found what seems to be one error in it.  I 'did' need to do "sudo chown -R pi:pi /home/weewx" before doing the pip installation step.   Remember - v5 pip runs as whatever user you run the pip command from.

so:
i) nope - just install it as 'pi' without sudo
ii) yup - see above.  I'll open an issue on github about that seeming omission in the instructions
iii) nope - just do the steps as written (with that one addition) as user 'pi'

vince

unread,
May 3, 2024, 2:56:29 PM5/3/24
to weewx-user
I'm sorry - that link is https://github.com/weewx/weewx/wiki/v5-upgrade above.  Typo on my part.
Reply all
Reply to author
Forward
0 new messages