Skip to content

Commit

Permalink
node-red: fix group permissions for Node-RED
Browse files Browse the repository at this point in the history
On startup the nodered user lost its dailout group permissions, which
caused external USB devices to be no longer accessible. This is fixed by
starting Node-RED via setpriv instead of via setuidgid.
  • Loading branch information
dirkjanfaber authored and jhofstee committed Jun 3, 2022
1 parent 0839e82 commit f1c1871
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions meta-venus/recipes-extended/node-red-venus/node-red-venus.bb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ DESCRIPTION = "Node-RED with venus integration"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

RDEPENDS:${PN} += "bash node-red node-red-contrib-victron"
RDEPENDS:${PN} += "bash node-red node-red-contrib-victron util-linux-setpriv"

SRC_URI = "\
file://node-red-venus.sh \
Expand All @@ -15,7 +15,7 @@ SRC_URI[sha256sum] = "e840fa1c7d7b25b0565551ad3582e24214cefb772a9af0238a9f7dac94

inherit daemontools useradd

DAEMONTOOLS_SCRIPT = "export HOME=/data/home/nodered && ${bindir}/prepare-node-red-venus.sh && exec setuidgid nodered ${bindir}/node-red-venus.sh"
DAEMONTOOLS_SCRIPT = "export HOME=/data/home/nodered && ${bindir}/prepare-node-red-venus.sh && exec setpriv --init-groups --reuid nodered --regid nodered ${bindir}/node-red-venus.sh"
DAEMONTOOLS_DOWN = "1"

USERADD_PACKAGES = "${PN}"
Expand Down

0 comments on commit f1c1871

Please sign in to comment.