MLB-LED-Scoreboard / mlb-led-scoreboard

An LED scoreboard for Major League Baseball :baseball:
GNU General Public License v3.0
576 stars 102 forks source link

Do not drop root privilege when running in venv #521

Closed ty-porter closed 4 months ago

ty-porter commented 4 months ago

https://github.com/hzeller/rpi-rgb-led-matrix/tree/master/bindings/python#user

The matrix drops privileges from root to daemon after it starts up. This is causing all kinds of issues where the daemon user seemingly doesn't have read permissions on a lot of different files. It's also recommended to use absolute paths (fixed in #519 already)

Main symptom this works around is not being able to find a cert from certifi in the new virtual environment, causing the scoreboard to crash on startup

I tried tweaking permissions on venv/* but did not seem to have an effect. It's likely still a pathing issue that would be difficult to work around.

Others are noting similar issues in Pi OS Bookworm so we don't seem to be alone here. https://github.com/hzeller/rpi-rgb-led-matrix/issues/1607