Tested with a "SDM630 Modbus v2" via a FR232R USB bridge.
For testing you can run mbmd scan -a /dev/serial/by-id/usb-SOMETHING_if00-port0
. Caveat: When running this as a normal user, make sure to be in the uucp
group. The program seems to not complain if it can't open the device. For the service this should be no issue, since the necessary user is created on installation and added to the appropriate group.
Overall, I made the systemd service file a bit more strict than the one upstream. It's not perfect I guess, so I'm open to suggestion to further improve the security of the daemon (preferably as a diff =)).
P.S.: I noticed the mbmd
user+group are only created AFTER the post-install script is executed.
So make sure to manually set the right permissions for the /etc/mbmd/mbmd.yaml
(and [...].dist
):
sudo chgrp mbmd /etc/mbmd/mbmd.yaml
Pinned Comments
archi42 commented on 2022-10-10 15:32 (UTC) (edited on 2023-01-26 17:46 (UTC) by archi42)
Tested with a "SDM630 Modbus v2" via a FR232R USB bridge.
For testing you can run
mbmd scan -a /dev/serial/by-id/usb-SOMETHING_if00-port0
. Caveat: When running this as a normal user, make sure to be in theuucp
group. The program seems to not complain if it can't open the device. For the service this should be no issue, since the necessary user is created on installation and added to the appropriate group.Overall, I made the systemd service file a bit more strict than the one upstream. It's not perfect I guess, so I'm open to suggestion to further improve the security of the daemon (preferably as a diff =)).
P.S.: I noticed the
mbmd
user+group are only created AFTER the post-install script is executed.So make sure to manually set the right permissions for the
/etc/mbmd/mbmd.yaml
(and[...].dist
):