From e472b0b2acc706913ce3712eb451b7a0e470352c Mon Sep 17 00:00:00 2001 From: legop3 Date: Mon, 10 Nov 2025 16:09:11 -0500 Subject: [PATCH] put mediamtx user in video group --- docs/pi-deployment.md | 1 + pi/install_roverd.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/pi-deployment.md b/docs/pi-deployment.md index 5685fb53..7128ddef 100644 --- a/docs/pi-deployment.md +++ b/docs/pi-deployment.md @@ -63,6 +63,7 @@ If the script installs the sample config, it will remind you to edit `/etc/rover ``` `roverd` requires access to `/dev/ttyAMA0` and `/sys/class/gpio`; keeping it under its own user ensures the rest of the system stays isolated. +`mediamtx` needs read access to the camera devices (`/dev/media*`, `/dev/video*`), so the install script adds its service account to the `video` group; if you created the user manually, make sure it belongs to `video`. **BRC note:** writing to `/sys/class/gpio/export` typically requires root on Raspberry Pi OS. Until the pulser moves to `libgpiod`, either run the service as root or set `brc.gpioPin: -1` (rover may eventually sleep). If you set `media.manage: true` in `/etc/roverd.yaml`, make sure the `roverd` service account can invoke `systemctl ` (either run the unit as root or grant sudo privileges for that command). diff --git a/pi/install_roverd.sh b/pi/install_roverd.sh index 06a236e5..a6bb7f76 100755 --- a/pi/install_roverd.sh +++ b/pi/install_roverd.sh @@ -173,8 +173,8 @@ if [[ $INSTALL_MEDIAMTX -eq 1 ]]; then exit 1 fi - ensure_user mediamtx "" - install_mediamtx_binary +ensure_user mediamtx "video" +install_mediamtx_binary install -d -o mediamtx -g mediamtx /etc/mediamtx install -o mediamtx -g mediamtx -m 0644 pi/mediamtx/mediamtx.yml /etc/mediamtx/mediamtx.yml install -m 0644 pi/systemd/mediamtx.service /etc/systemd/system/mediamtx.service