rdmtc / RedMatic

Node-RED packaged as Addon for the Homematic CCU3 and RaspberryMatic 🤹‍♂️
Apache License 2.0
534 stars 47 forks source link

Das addon Verzeichnis redmatic gehört nicht root #16

Closed FrodoVDR closed 6 years ago

FrodoVDR commented 6 years ago

Bei der Installation von zusätzlichen nodes kommt die Fehlermeldung das die Berechtigung nicht passt. Nach dem ich die Benutzer und Gruppenrechte des Verzeichniss /usr/local/addons/redmatic von 2000:2000 auf root:root gesetzt habe ist der Fehler behoben. chown -R root:root /usr/local/addons/redmatic

hobbyquaker commented 6 years ago

Hmm, das ist seltsam, ist mir bei meinen Tests bisher nicht untergekommen. Kannst Du mal checken welchen Besitzer/Gruppe /usr/local/addons bei Dir hat?

FrodoVDR commented 6 years ago

Das Verzeichnis gehört root:root

/usr/local/addons
# ls -la
total 40
drwxr-xr-x   10 root     root          4096 Jun 11 11:15 .
drwxr-xr-x    8 root     root          4096 May 28 18:28 ..
drwxr-xr-x    4 root     root          4096 Apr 20 20:40 ccu-historian
drwxr-xr-x    3 root     root          4096 Feb  4 18:01 check_mk_agent
drwxr-xr-x    5 root     root          4096 Jun 12 20:55 cuxd
drwx------    2 root     root          4096 Apr 10 10:23 netatmo
drwxr-xr-x   10 2000     2000          4096 Jun 11 18:02 redmatic
drwxr-xr-x    6 root     root          4096 Jun  1 22:24 rmupdate

Dein Addon erhält selbst nach einem Update die falschen Rechte. Eventuell liegt es daran das ich sowohl die Installation als auch das Update über das addon rmupdate (https://github.com/j-a-n/raspberrymatic-addon-rmupdate) durchgeführt habe.

hobbyquaker commented 6 years ago

Eventuell liegt es daran das ich sowohl die Installation als auch das Update über das addon rmupdate durchgeführt habe.

Ok, ich denke das ist der entscheidende Hinweis. Werde das mal testen.

FrodoVDR commented 6 years ago

Gerade selbst getestet, wenn ich Dein addon über die Homematic Oberfläche installiere gehört alles root, nehme ich rmupdate gehört es 2000 .

jens-maus commented 6 years ago

@hobbyquaker Du solltest in deinem build.sh beim zusammenpacken des tar.gz explizit root als Nutzer aller Files setzen.

Vergleiche

https://github.com/jens-maus/hm-watchdog/blob/master/generate_img.sh#L21 mit https://github.com/hobbyquaker/RedMatic/blob/master/build.sh#L129

Zusätzlich sollte in der Tat Jan im rmupdate addon einbauen das das addon Paket auch immer als root:root ausgepackt wird.

j-a-n commented 6 years ago

Das Problem sollte durch die Version 1.12.3 von rmupdate gelöst sein.

hobbyquaker commented 6 years ago

Danke Jan und Jens!

jens-maus commented 6 years ago

@hobbyquaker Du solltest aber trotzdem das tar.gz mit --owner=root --group=root zusammenpacken lassen ;)