Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Permission Problem bei Installation von Adaptern

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Permission Problem bei Installation von Adaptern

    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Micky79 last edited by

      Hallo an Alle,

      ich habe seit kurzem öfters Probleme bei installieren von Adaptern. Es gibt da ein Permission Problem. Manchmal wir es nur angezeigt und die Installation läuft trotzdem durch. Manchmal jedoch auch nicht.

      Ganz schlimm ist dies beim installieren des Script Adapters (Version 4.0.1). Er kann so gar nicht installiert werden.

      Siehe LOG unten.

      Wenn ich den Adapter manuell mit: npm install iobroker.javascript@4.0.1 –production --save --unsafe-perm --prefix "/opt/iobroker" installiere hat es funktioniert.

      Ich meine aber auch, dass früher die Adapter standardmäßig mit Unsafe-Perm installiert wurden.

      Mein iobroker läuft schon seit langem stabil in einem Docker Container. Es muss sich also irgendetwas bei iobroker geändert haben oder?

      Kann ich irgendwo einstellen, dass unsafe-perm wieder standardmäßig verwendet wird.

      Viele Grüße Micky

      obroker	2018-12-04 10:06:19.087	error	host.iobroker Cannot install iobroker.javascript@4.0.1: 243
      iobroker	2018-12-04 10:06:19.072	info	npm ERR! A complete log of this run can be found in:npm ERR! /root/.npm/_logs/2018-12-04T09_06_19_045Z-debug.log
      iobroker	2018-12-04 10:06:19.072	info	
      iobroker	2018-12-04 10:06:19.042	info	npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
      iobroker	2018-12-04 10:06:19.042	info	npm ERR! npm ERR! Failed at the iobroker.javascript@4.0.1 postinstall script.
      iobroker	2018-12-04 10:06:19.041	info	npm ERR! Exit status 243
      iobroker	2018-12-04 10:06:19.041	info	npm ERR! iobroker.javascript@4.0.1 postinstall: `node ./install/installTypings.js`
      iobroker	2018-12-04 10:06:19.041	info	ERR! code ELIFECYCLEnpm ERR! errno 243
      iobroker	2018-12-04 10:06:19.040	info	npm
      iobroker	2018-12-04 10:06:19.039	info	npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
      iobroker	2018-12-04 10:06:19.039	info	WARN optional SKIPPING OPTIONAL DEPENDENCY: authenticate-pam@1.0.2 (node_modules/authenticate-pam):npm WARN optional SKIPPING OPTIONAL DEPENDENCY: authenticate-pam@1.0.2 install: `node-gyp rebuild`
      iobroker	2018-12-04 10:06:19.038	info	npm
      iobroker	2018-12-04 10:06:18.425	info	npm ERR! the command again as root/Administrator (though this is not recommended).
      iobroker	2018-12-04 10:06:18.425	info	npm ERR! permissions of the file and its containing directories, or try running
      iobroker	2018-12-04 10:06:18.425	info	npm ERR! If you believe this might be a permissions issue, please double-check the
      iobroker	2018-12-04 10:06:18.425	info	npm ERR!
      iobroker	2018-12-04 10:06:18.425	info	npm ERR! It is likely you do not have the permissions to access this file as the current user
      iobroker	2018-12-04 10:06:18.425	info	npm ERR! The operation was rejected by your operating system.
      iobroker	2018-12-04 10:06:18.425	info	npm ERR!
      iobroker	2018-12-04 10:06:18.425	info	npm ERR! path: '/root/.npm/_cacache/index-v5/fc/ee/fc3e1dd6706bd557d2840d92ff10cdd6928b92fb8c46d2195dfbd8d4b2be' }
      iobroker	2018-12-04 10:06:18.425	info	npm ERR! syscall: 'open',
      iobroker	2018-12-04 10:06:18.425	info	npm ERR! code: 'EACCES',
      iobroker	2018-12-04 10:06:18.425	info	npm ERR! errno: -13,
      iobroker	2018-12-04 10:06:18.425	info	npm ERR! stack: 'Error: EACCES: permission denied, open \'/root/.npm/_cacache/index-v5/fc/ee/fc3e1dd6706bd557d2840d92ff10cdd6928b92fb8c46d2195dfbd8d4b2be\'',
      iobroker	2018-12-04 10:06:18.425	info	npm ERR! isOperational: true,
      iobroker	2018-12-04 10:06:18.425	info	npm ERR! path: '/root/.npm/_cacache/index-v5/fc/ee/fc3e1dd6706bd557d2840d92ff10cdd6928b92fb8c46d2195dfbd8d4b2be' },
      iobroker	2018-12-04 10:06:18.425	info	npm ERR! syscall: 'open',
      iobroker	2018-12-04 10:06:18.425	info	npm ERR! code: 'EACCES',
      iobroker	2018-12-04 10:06:18.425	info	npm ERR! errno: -13,
      iobroker	2018-12-04 10:06:18.425	info	npm ERR! { Error: EACCES: permission denied, open '/root/.npm/_cacache/index-v5/fc/ee/fc3e1dd6706bd557d2840d92ff10cdd6928b92fb8c46d2195dfbd8d4b2be'
      iobroker	2018-12-04 10:06:18.425	info	npm ERR! cause:
      iobroker	2018-12-04 10:06:18.425	info	npm ERR! Error: EACCES: permission denied, open '/root/.npm/_cacache/index-v5/fc/ee/fc3e1dd6706bd557d2840d92ff10cdd6928b92fb8c46d2195dfbd8d4b2be'npm ERR! { Error: EACCES: permission denied, open '/r
      iobroker	2018-12-04 10:06:18.423	info	npm ERR! syscall open
      iobroker	2018-12-04 10:06:18.423	info	npm ERR! errno -13
      iobroker	2018-12-04 10:06:18.423	info	ERR! path /root/.npm/_cacache/index-v5/fc/ee/fc3e1dd6706bd557d2840d92ff10cdd6928b92fb8c46d2195dfbd8d4b2benpm ERR! code EACCES
      iobroker	2018-12-04 10:06:18.423	info	npm
      iobroker	2018-12-04 10:06:18.271	info	path: '/root/.npm/_logs' }
      iobroker	2018-12-04 10:06:18.271	info	syscall: 'scandir',
      iobroker	2018-12-04 10:06:18.271	info	code: 'EACCES',
      iobroker	2018-12-04 10:06:18.271	info	errno: -13,
      iobroker	2018-12-04 10:06:18.271	info	glob error { Error: EACCES: permission denied, scandir '/root/.npm/_logs' stack: 'Error: EACCES: permission denied, scandir \'/root/.npm/_logs\'',
      iobroker	2018-12-04 10:06:18.270	info	npm ERR! the command again as root/Administrator (though this is not recommended).
      iobroker	2018-12-04 10:06:18.270	info	npm ERR! permissions of the file and its containing directories, or try running
      iobroker	2018-12-04 10:06:18.270	info	npm ERR! If you believe this might be a permissions issue, please double-check the
      iobroker	2018-12-04 10:06:18.270	info	npm ERR!
      iobroker	2018-12-04 10:06:18.270	info	npm ERR! It is likely you do not have the permissions to access this file as the current user
      iobroker	2018-12-04 10:06:18.270	info	npm ERR! The operation was rejected by your operating system.
      iobroker	2018-12-04 10:06:18.270	info	npm ERR!
      iobroker	2018-12-04 10:06:18.270	info	ERR! syscall: 'scandir',npm ERR! path: '/root/.npm/_logs' }
      iobroker	2018-12-04 10:06:18.269	info	npm
      iobroker	2018-12-04 10:06:18.269	info	npm ERR! code: 'EACCES',
      iobroker	2018-12-04 10:06:18.269	info	npm ERR! errno: -13,
      iobroker	2018-12-04 10:06:18.269	info	npm ERR! stack: 'Error: EACCES: permission denied, scandir \'/root/.npm/_logs\'',
      iobroker	2018-12-04 10:06:18.269	info	npm ERR! Error: EACCES: permission denied, scandir '/root/.npm/_logs'npm ERR! { Error: EACCES: permission denied, scandir '/root/.npm/_logs'
      iobroker	2018-12-04 10:06:18.268	info	npm ERR! syscall scandir
      iobroker	2018-12-04 10:06:18.268	info	npm ERR! errno -13
      iobroker	2018-12-04 10:06:18.268	info	ERR! path /root/.npm/_logsnpm ERR! code EACCES
      iobroker	2018-12-04 10:06:18.268	info	npm
      iobroker	2018-12-04 10:06:17.738	info	gyp ERR! not ok
      iobroker	2018-12-04 10:06:17.738	info	gyp ERR! node-gyp -v v3.8.0
      iobroker	2018-12-04 10:06:17.738	info	gyp ERR! cwd /opt/iobroker/node_modules/authenticate-pamgyp ERR! node -v v8.14.0
      iobroker	2018-12-04 10:06:17.738	info	gyp ERR! System Linux 4.9.0-8-amd64gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
      iobroker	2018-12-04 10:06:17.737	info	ERR! clean error gyp ERR! stack Error: EACCES: permission denied, rmdir 'build'
      iobroker	2018-12-04 10:06:17.737	info	gyp
      iobroker	2018-12-04 10:06:14.087	info	WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
      iobroker	2018-12-04 10:06:14.087	info	npm
      iobroker	2018-12-04 10:06:10.864	info	npm install iobroker.javascript@4.0.1 --production --save --prefix "/opt/iobroker" (System call)
      iobroker	2018-12-04 10:06:10.694	info	NPM version: 6.4.1
      iobroker	2018-12-04 10:06:10.512	info	Update javascript from @3.6.4 to @4.0.1
      iobroker	2018-12-04 10:06:10.090	info	upgrade javascript
      
      1 Reply Last reply Reply Quote 0
      • AlCalzone
        AlCalzone Developer last edited by

        unsafe-perm ist bei der Installation der meisten Adapter unnötig und sollte auch besser nicht verwendet werden - es sei denn es muss UNBEDINGT sein (z.B. zwave).

        NPM ist generell etwas pingelig, was die Installation als Root angeht. Dein Problem kann dabei nämlich unter anderem auftreten, wenn danach als nicht-Root installiert wird.

        Wenn du per chown wieder den Besitz von /opt/iobroker (und insbesondere node_modules) an dich reißt, dürfte das Problem verschwinden.

        Unter welchem User wird denn dein ioBroker ausgeführt?

        1 Reply Last reply Reply Quote 0
        • apollon77
          apollon77 last edited by

          Hi,

          warum sollte das früher mit unsafe-perm installiert worden sein? Es gibt atuell glaube ich 4 Adapter wo das nötig ist und das ist im js.controller hinterlegt. Für andere Adapter ist das im Standard nicht nötig.

          Also was hast Du wann wie "rumgefummelt"?

          1 Reply Last reply Reply Quote 0
          • AlCalzone
            AlCalzone Developer last edited by

            Eine potentielle Lösung ist hier: https://stackoverflow.com/questions/161 … thout-sudo

            sudo chown -R $(whoami) ~/.npm
            
            1 Reply Last reply Reply Quote 0
            • M
              Micky79 last edited by

              Danke für die schnellen Antworten.

              Ich war der Meinung früher öfters den –unsafe-perm Parameter bei der Installation gesehen zu haben. Kann mich aber auch irren.

              Ich werde das mit chown -R $(whoami) ~/.npm mal ausprobieren.

              Danke schon mal

              1 Reply Last reply Reply Quote 0
              • M
                Micky79 last edited by

                Da iobroker im DockerContainer läuft müsste er eigentlich als Root laufen.

                1 Reply Last reply Reply Quote 0
                • M
                  Micky79 last edited by

                  Ich habe in meinem DockerFile zum Schluss folgende Zeile eingefügt:

                  RUN chown -R root:root /opt/iobroker

                  Dann Container aus dem Image erzeugt und jetzt läuft es ohne Permission Probleme.

                  Hätte zwar nicht gedacht das dies nötig ist, aber man lernt ja nie aus.

                  Nochmals Danke.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post

                  Support us

                  ioBroker
                  Community Adapters
                  Donate
                  FAQ Cloud / IOT
                  HowTo: Node.js-Update
                  HowTo: Backup/Restore
                  Downloads
                  BLOG

                  674
                  Online

                  31.7k
                  Users

                  79.8k
                  Topics

                  1.3m
                  Posts

                  3
                  7
                  1305
                  Loading More Posts
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes
                  Reply
                  • Reply as topic
                  Log in to reply
                  Community
                  Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                  The ioBroker Community 2014-2023
                  logo