Dedicated user account for weewx?

56 views
Skip to first unread message

Wayne

unread,
Jan 17, 2023, 6:23:29 PM1/17/23
to weewx...@googlegroups.com
Hello - I am a new weewx user with medium proficiency in linux. Running on a Raspberry Pi 4 installed from DEB package.

Is there any benefit to creating a superuser account specifically for weewx instead of running as "root"? It seems to me it would be a better practice for using rsync to transfer files to an http server on another machine. Or maybe it's not worth the effort. Comments??

Greg Troxel

unread,
Jan 17, 2023, 6:37:36 PM1/17/23
to Wayne, weewx...@googlegroups.com
Yes, it's basically always better to have a uid (and to a lesser extend
gid) for each daemon and to grant them access to as little as possible.

weewx doesn't need to be root, in general. It just needs rw access to
devices that access weather stations, at least in my case.

https://en.wikipedia.org/wiki/Principle_of_least_privilege

cric...@pobox.com

unread,
Jan 18, 2023, 8:11:25 AM1/18/23
to weewx-user
Aside from communicating with your weather station, the only other non-root hang up was where
the PID file was being written.  That's an easy command line option to write it somewhere the user
does have permissions.  I don't let systemd manage the process, so I don't need the pid file any
particular place.
Chris

Cameron D

unread,
Jan 18, 2023, 7:06:16 PM1/18/23
to weewx-user
There are notes on various aspects to this in the weewk wiki
Reply all
Reply to author
Forward
0 new messages