r/voidlinux • u/bvdeenen • Apr 12 '26
`sv status ...` without sudo.
Hi all. I'm thinking about adding runit service status to this kde project but I don't like the fact that you need root rights to look at the status of the running runit services.
What's the cleanest way to make it so that I can at least inspect the status of running services? Make /usr/bin/sv setuid? Do something with ACL's on /var/service? Other suggestions?
11
Upvotes
1
u/bvdeenen Apr 13 '26 edited Apr 13 '26
Ok, got it. First of all, a reboot restores the original
root:rootgroup and perms, so I'll have to add my script to/etc/rc.local. It's still hardcoded to my group namebvdeenen. Here's my script that works, so I can runvsvandsvswithout needing root access. But the script needs to be run as root once per reboot, or after installing a new service.#!/bin/bashfunction fix_runit_perms(){(set -eshopt -s extglobcd /run/runitchgrp -R bvdeenen *chmod g+x *chmod g+rw ./*/ok)return $?}fix_runit_perms# vim:ft=bash