Give https://github.com/weewx/weewx/wiki/Understanding-permissions a read 
and see if that helps.....

Summary is at 
https://github.com/weewx/weewx/wiki/Understanding-permissions#the-weewx-user 
and which group typically permits most is at the bottom of the same page.

On Monday, March 11, 2024 at 4:13:49 PM UTC-7 Gord Snarr (GSFarm) wrote:

> New install on a fresh RPI4B, new card etc. 
>
> Installation seems to go fine, but there seems to be a permissions issue 
> with the USB0 port I am using for the USB -> serial adapter to the serial 
> console on the Davis VP.
>
> Log as follows:
>
> × weewx.service - WeeWX
>      Loaded: loaded (/lib/systemd/system/weewx.service; enabled; preset: 
> enabled)
>      Active: failed (Result: exit-code) since Mon 2024-03-11 17:10:35 CDT; 
> 38min ago
>    Duration: 342ms
>        Docs: https://weewx.com/docs
>     Process: 2511 ExecStart=weewxd /etc/weewx/weewx.conf (code=exited, 
> status=4)
>    Main PID: 2511 (code=exited, status=4)
>         CPU: 343ms
>
> Mar 11 17:10:35 raspberrypi weewxd[2511]: CRITICAL weewx.engine:     **** 
>                         
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Mar 11 17:10:35 raspberrypi weewxd[2511]: CRITICAL weewx.engine:     **** 
>    File "/usr/lib/python3/dist-packages/serial/serialutil.py", line 244, in 
> __init__
> Mar 11 17:10:35 raspberrypi weewxd[2511]: CRITICAL weewx.engine:     **** 
>      self.open()
> Mar 11 17:10:35 raspberrypi weewxd[2511]: CRITICAL weewx.engine:     **** 
>    File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 325, 
> in open
> Mar 11 17:10:35 raspberrypi weewxd[2511]: CRITICAL weewx.engine:     **** 
>      raise SerialException(msg.errno, "could not open port {}: 
> {}".format(self._port, msg))
> Mar 11 17:10:35 raspberrypi weewxd[2511]: CRITICAL weewx.engine:     **** 
>  serial.serialutil.SerialException: [Errno 13] could not open port 
> /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'
> Mar 11 17:10:35 raspberrypi weewxd[2511]: CRITICAL __main__: Unable to 
> load driver: [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] 
> Permission denied: '/dev/ttyUSB0'
> Mar 11 17:10:35 raspberrypi weewxd[2511]: CRITICAL __main__:     **** 
>  Exiting...
> Mar 11 17:10:35 raspberrypi systemd[1]: weewx.service: Main process 
> exited, code=exited, status=4/NOPERMISSION
> Mar 11 17:10:35 raspberrypi systemd[1]: weewx.service: Failed with result 
> 'exit-code'.
> ~
>
> VER:
> Linux raspberrypi 6.6.20+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 
> (2024-03-07) aarch64
>
> HRDWR
> RPI-4B
> Davis Vantage Pro (not the II).
> Weewx version (what ever downloaded today using "apt install weewx"). 
> Think it's 5.0.2.
>
> What should the permissions be set to the port, or user added? Is it 
> weewxd, root, pi?
> SHould I change the user in the weewx.conf, or change the chmod the port?
>
> Maybe I should have started with an older weewx version and upgraded? This 
> may have been sorted out already previously.
> Thankx in advance,
> -G.
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/56d26d74-b088-425e-92a3-7a30370f98bbn%40googlegroups.com.

Reply via email to