Run as meshtasticd user (not root)#20
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the Meshtastic daemon to run as a dedicated meshtasticd user instead of root.
- init script now chowns the data and config directories and sets the service user to
meshtasticd - bumped
PKG_RELEASEto 2 and addedUSERIDmetadata in the Makefile
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| meshtasticd/files/meshtasticd.init | chown data/config dirs and configure procd to use meshtasticd user |
| meshtasticd/Makefile | incremented release number and specified USERID |
Comments suppressed due to low confidence (3)
meshtasticd/files/meshtasticd.init:23
- Ensure that the
meshtasticduser and group are created (e.g., via package install scripts) before runningchown, otherwise the command may fail if the user/group doesn't exist.
chown -R meshtasticd:meshtasticd $DATA_DIR
meshtasticd/files/meshtasticd.init:24
- Similarly, verify that
$CONFIG_BASEDIRexists and that themeshtasticduser/group exist before applyingchown, to prevent startup errors.
chown -R meshtasticd:meshtasticd $CONFIG_BASEDIR
meshtasticd/Makefile:48
- Add a user-creation step (e.g.,
adduser/addgroup) in the package install phase so that theUSERIDvariable has effect and avoids installation failures when the user is missing.
USERID:=meshtasticd:meshtasticd
c607608 to
ee68292
Compare
ee68292 to
b62078f
Compare
b62078f to
712fd8d
Compare
712fd8d to
51c6518
Compare
51c6518 to
8170f23
Compare
8170f23 to
f8ef39e
Compare
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
DRAFT while I figure out
udevhotplug.dfor this.