Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Off Topic
  4. Mosquitto LXC Rechteproblem

NEWS

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    12
    1
    131

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    17
    1
    4.3k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    1.2k

Mosquitto LXC Rechteproblem

Scheduled Pinned Locked Moved Off Topic
16 Posts 4 Posters 775 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Marcel Drzal 0M Marcel Drzal 0

    Hallo zusammen,

    ich kann nur über den sudo (Root) auf mosquitto -h

    ich denke es ist ein rechteproblem und möchte nicht mit Root arbeiten. Wie kann ich das Problem auber hin bekommen.

    8966077c-5c55-4450-b083-b7ad1bce642b-image.png

    haus-automatisierungH Online
    haus-automatisierungH Online
    haus-automatisierung
    Developer Most Active
    wrote on last edited by haus-automatisierung
    #3

    @marcel-drzal-0 Wie hast Du mosquitto denn installiert? Über apt?

    Wie sieht deine Path-Variable aus? echo $PATH

    Normalerweise landet die Standard-Installation in /usr/sbin/. Also /usr/sbin/mosquitto.

    Und dann wird ja auch der Linux-Benutzer mosquitto angelegt, unter welchem der Prozess läuft. Also der Prozess selbst wird nicht als root laufen.

    🧑‍🎓 Autor des beliebten ioBroker-Master-Kurses
    🎥 Tutorials rund um das Thema DIY-Smart-Home: https://haus-automatisierung.com/
    📚 Meine inoffizielle ioBroker Dokumentation

    Marcel Drzal 0M 1 Reply Last reply
    0
    • Marcel Drzal 0M Offline
      Marcel Drzal 0M Offline
      Marcel Drzal 0
      wrote on last edited by
      #4

      3d3a7ff6-d8ea-4939-965a-42796fa56fb9-image.png

      haus-automatisierungH 1 Reply Last reply
      0
      • haus-automatisierungH haus-automatisierung

        @marcel-drzal-0 Wie hast Du mosquitto denn installiert? Über apt?

        Wie sieht deine Path-Variable aus? echo $PATH

        Normalerweise landet die Standard-Installation in /usr/sbin/. Also /usr/sbin/mosquitto.

        Und dann wird ja auch der Linux-Benutzer mosquitto angelegt, unter welchem der Prozess läuft. Also der Prozess selbst wird nicht als root laufen.

        Marcel Drzal 0M Offline
        Marcel Drzal 0M Offline
        Marcel Drzal 0
        wrote on last edited by
        #5

        @haus-automatisierung

        ein 2. Problem was ich habe ist

        d8d5a6c7-95a2-498a-88a8-60334b7a28bf-image.png

        bin in deinem Video Kus Grundkonfiguration von Mosquitto (06:41

        1 Reply Last reply
        0
        • Marcel Drzal 0M Marcel Drzal 0

          3d3a7ff6-d8ea-4939-965a-42796fa56fb9-image.png

          haus-automatisierungH Online
          haus-automatisierungH Online
          haus-automatisierung
          Developer Most Active
          wrote on last edited by haus-automatisierung
          #6

          @marcel-drzal-0 Dann trag in deine ~/.bashrc doch einfach export PATH=/usr/local/sbin:/usr/sbin/:$PATH ein. Damit wäre Problem 1 gelöst.

          Wie sieht denn deine Config aus? Vertippt? Port 1883 schon in Benutzung?

          🧑‍🎓 Autor des beliebten ioBroker-Master-Kurses
          🎥 Tutorials rund um das Thema DIY-Smart-Home: https://haus-automatisierung.com/
          📚 Meine inoffizielle ioBroker Dokumentation

          Marcel Drzal 0M 1 Reply Last reply
          1
          • haus-automatisierungH haus-automatisierung

            @marcel-drzal-0 Dann trag in deine ~/.bashrc doch einfach export PATH=/usr/local/sbin:/usr/sbin/:$PATH ein. Damit wäre Problem 1 gelöst.

            Wie sieht denn deine Config aus? Vertippt? Port 1883 schon in Benutzung?

            Marcel Drzal 0M Offline
            Marcel Drzal 0M Offline
            Marcel Drzal 0
            wrote on last edited by Marcel Drzal 0
            #7

            @haus-automatisierung verstehe es nicht sorry hatte aber immer 1886

            haus-automatisierungH 1 Reply Last reply
            0
            • Marcel Drzal 0M Marcel Drzal 0

              @haus-automatisierung verstehe es nicht sorry hatte aber immer 1886

              haus-automatisierungH Online
              haus-automatisierungH Online
              haus-automatisierung
              Developer Most Active
              wrote on last edited by haus-automatisierung
              #8

              @marcel-drzal-0

              1. Das mit sudo spielt ja erstmal keine Rolle. Schau in meine Linux-Grundlagen, wenn Du mehr zu PATH und bash wissen willst. Aber ist nicht so wichtig.
              2. Zeig mal bitte die Config-Dateien von Mosquitto.
              cat /etc/mosquitto/mosquitto.conf
              cat /etc/mosquitto/conf.d/*.conf
              

              🧑‍🎓 Autor des beliebten ioBroker-Master-Kurses
              🎥 Tutorials rund um das Thema DIY-Smart-Home: https://haus-automatisierung.com/
              📚 Meine inoffizielle ioBroker Dokumentation

              Marcel Drzal 0M 1 Reply Last reply
              0
              • haus-automatisierungH haus-automatisierung

                @marcel-drzal-0

                1. Das mit sudo spielt ja erstmal keine Rolle. Schau in meine Linux-Grundlagen, wenn Du mehr zu PATH und bash wissen willst. Aber ist nicht so wichtig.
                2. Zeig mal bitte die Config-Dateien von Mosquitto.
                cat /etc/mosquitto/mosquitto.conf
                cat /etc/mosquitto/conf.d/*.conf
                
                Marcel Drzal 0M Offline
                Marcel Drzal 0M Offline
                Marcel Drzal 0
                wrote on last edited by Marcel Drzal 0
                #9

                @haus-automatisierung

                211dad00-28aa-4587-a172-929f02048091-image.png

                haus-automatisierungH HomoranH 2 Replies Last reply
                0
                • Marcel Drzal 0M Marcel Drzal 0

                  @haus-automatisierung

                  211dad00-28aa-4587-a172-929f02048091-image.png

                  haus-automatisierungH Online
                  haus-automatisierungH Online
                  haus-automatisierung
                  Developer Most Active
                  wrote on last edited by haus-automatisierung
                  #10

                  @marcel-drzal-0 allow schreibt man mit 2 l. Und irgendwie hast Du zwei Config-Dateien, in welchen fast das gleiche steht (nur 1x mit Tippfehler). Eine von beiden löschen und dann die andere ggf korrigieren.

                  ls -la /etc/mosquitto/conf.d/

                  🧑‍🎓 Autor des beliebten ioBroker-Master-Kurses
                  🎥 Tutorials rund um das Thema DIY-Smart-Home: https://haus-automatisierung.com/
                  📚 Meine inoffizielle ioBroker Dokumentation

                  Marcel Drzal 0M 1 Reply Last reply
                  0
                  • Marcel Drzal 0M Marcel Drzal 0

                    @haus-automatisierung

                    211dad00-28aa-4587-a172-929f02048091-image.png

                    HomoranH Do not disturb
                    HomoranH Do not disturb
                    Homoran
                    Global Moderator Administrators
                    wrote on last edited by
                    #11

                    @marcel-drzal-0 Bitte keine Screenshots von Konsolentext!
                    als Text in code-tags posten!

                    https://forum.iobroker.net/topic/51555/hinweise-für-gute-forenbeiträge/1

                    kein Support per PN! - Fragen im Forum stellen -

                    Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

                    ioBroker freut sich auch über eine Spende für das Forum. Benutzt dazu den Spendenbutton im Header. Danke!

                    der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

                    1 Reply Last reply
                    0
                    • haus-automatisierungH haus-automatisierung

                      @marcel-drzal-0 allow schreibt man mit 2 l. Und irgendwie hast Du zwei Config-Dateien, in welchen fast das gleiche steht (nur 1x mit Tippfehler). Eine von beiden löschen und dann die andere ggf korrigieren.

                      ls -la /etc/mosquitto/conf.d/

                      Marcel Drzal 0M Offline
                      Marcel Drzal 0M Offline
                      Marcel Drzal 0
                      wrote on last edited by
                      #12

                      @haus-automatisierung sagte in Mosquitto LXC Rechteproblem:

                      ls -la /etc/mosquitto/conf.d/

                      
                      smarthome@Mosquitto:~$ ls -la /etc/mosquitto/conf.d/
                      
                      total 20
                      drwxr-xr-x 2 root root 4096 Apr 28 11:37 .
                      drwxr-xr-x 5 root root 4096 Apr 28 12:10 ..
                      -rw-r--r-- 1 root root  142 Jun  9  2021 README
                      -rw-r--r-- 1 root root   72 Oct  2  2022 access.conf
                      -rw-r--r-- 1 root root   85 Apr 28 11:37 custom.conf
                      smarthome@Mosquitto:~$
                      
                      
                      haus-automatisierungH 1 Reply Last reply
                      0
                      • Marcel Drzal 0M Marcel Drzal 0

                        @haus-automatisierung sagte in Mosquitto LXC Rechteproblem:

                        ls -la /etc/mosquitto/conf.d/

                        
                        smarthome@Mosquitto:~$ ls -la /etc/mosquitto/conf.d/
                        
                        total 20
                        drwxr-xr-x 2 root root 4096 Apr 28 11:37 .
                        drwxr-xr-x 5 root root 4096 Apr 28 12:10 ..
                        -rw-r--r-- 1 root root  142 Jun  9  2021 README
                        -rw-r--r-- 1 root root   72 Oct  2  2022 access.conf
                        -rw-r--r-- 1 root root   85 Apr 28 11:37 custom.conf
                        smarthome@Mosquitto:~$
                        
                        
                        haus-automatisierungH Online
                        haus-automatisierungH Online
                        haus-automatisierung
                        Developer Most Active
                        wrote on last edited by
                        #13

                        @marcel-drzal-0

                        sudo rm /etc/mosquitto/conf.d/access.conf
                        cat /etc/mosquitto/conf.d/custom.conf
                        

                        🧑‍🎓 Autor des beliebten ioBroker-Master-Kurses
                        🎥 Tutorials rund um das Thema DIY-Smart-Home: https://haus-automatisierung.com/
                        📚 Meine inoffizielle ioBroker Dokumentation

                        Marcel Drzal 0M 1 Reply Last reply
                        0
                        • haus-automatisierungH haus-automatisierung

                          @marcel-drzal-0

                          sudo rm /etc/mosquitto/conf.d/access.conf
                          cat /etc/mosquitto/conf.d/custom.conf
                          
                          Marcel Drzal 0M Offline
                          Marcel Drzal 0M Offline
                          Marcel Drzal 0
                          wrote on last edited by Marcel Drzal 0
                          #14

                          @haus-automatisierung

                          Es geht nun wieder. :+1:
                          Ich habe mit Proxmox zurück gesetzt.

                          smarthome@Mosquitto:~$ echo $PATH
                          /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
                          smarthome@Mosquitto:~$
                          
                          
                          smarthome@Mosquitto:~$ cat /etc/mosquitto/mosquitto.conf
                          # Place your local configuration in /etc/mosquitto/conf.d/
                          #
                          # A full description of the configuration file is at
                          # /usr/share/doc/mosquitto/examples/mosquitto.conf.example
                          
                          listener 1886
                          
                          pid_file /run/mosquitto/mosquitto.pid
                          
                          persistence true
                          persistence_location /var/lib/mosquitto/
                          
                          log_dest file /var/log/mosquitto/mosquitto.log
                          
                          include_dir /etc/mosquitto/conf.d
                          smarthome@Mosquitto:~$ sudo service mosquitto status
                          * mosquitto.service - Mosquitto MQTT Broker
                               Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled; vendor preset: enabled)
                               Active: active (running) since Mon 2024-04-29 16:57:54 CEST; 8min ago
                                 Docs: man:mosquitto.conf(5)
                                       man:mosquitto(8)
                              Process: 140 ExecStartPre=/bin/mkdir -m 740 -p /var/log/mosquitto (code=exited, status=0/SUCCESS)
                              Process: 142 ExecStartPre=/bin/chown mosquitto /var/log/mosquitto (code=exited, status=0/SUCCESS)
                              Process: 146 ExecStartPre=/bin/mkdir -m 740 -p /run/mosquitto (code=exited, status=0/SUCCESS)
                              Process: 147 ExecStartPre=/bin/chown mosquitto /run/mosquitto (code=exited, status=0/SUCCESS)
                             Main PID: 148 (mosquitto)
                                Tasks: 1 (limit: 38084)
                               Memory: 2.6M
                                  CPU: 128ms
                               CGroup: /system.slice/mosquitto.service
                                       `-148 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
                          
                          Apr 29 16:57:54 Mosquitto systemd[1]: Starting Mosquitto MQTT Broker...
                          Apr 29 16:57:54 Mosquitto mosquitto[148]: 1714402674: Loading config file /etc/mosquitto/conf.d/access.conf
                          Apr 29 16:57:54 Mosquitto systemd[1]: Started Mosquitto MQTT Broker.
                          smarthome@Mosquitto:~$
                          
                          

                          Nun ist nur noch das Problem mit dem Befehl
                          mosquitto -h

                          smarthome@Mosquitto:~$ mosquitto -h
                          -bash: mosquitto: command not found
                          smarthome@Mosquitto:~$ sudo mosquitto -h
                          mosquitto version 2.0.11
                          
                          mosquitto is an MQTT v5.0/v3.1.1/v3.1 broker.
                          
                          Usage: mosquitto [-c config_file] [-d] [-h] [-p port]
                          
                           -c : specify the broker config file.
                           -d : put the broker into the background after starting.
                           -h : display this help.
                           -p : start the broker listening on the specified port.
                                Not recommended in conjunction with the -c option.
                           -v : verbose mode - enable all logging types. This overrides
                                any logging options given in the config file.
                          
                          See https://mosquitto.org/ for more information.
                          
                          smarthome@Mosquitto:~$
                          
                          

                          538675de-0740-48b1-98f5-fe05034ce048-image.png

                          Thomas BraunT 1 Reply Last reply
                          0
                          • Marcel Drzal 0M Marcel Drzal 0

                            @haus-automatisierung

                            Es geht nun wieder. :+1:
                            Ich habe mit Proxmox zurück gesetzt.

                            smarthome@Mosquitto:~$ echo $PATH
                            /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
                            smarthome@Mosquitto:~$
                            
                            
                            smarthome@Mosquitto:~$ cat /etc/mosquitto/mosquitto.conf
                            # Place your local configuration in /etc/mosquitto/conf.d/
                            #
                            # A full description of the configuration file is at
                            # /usr/share/doc/mosquitto/examples/mosquitto.conf.example
                            
                            listener 1886
                            
                            pid_file /run/mosquitto/mosquitto.pid
                            
                            persistence true
                            persistence_location /var/lib/mosquitto/
                            
                            log_dest file /var/log/mosquitto/mosquitto.log
                            
                            include_dir /etc/mosquitto/conf.d
                            smarthome@Mosquitto:~$ sudo service mosquitto status
                            * mosquitto.service - Mosquitto MQTT Broker
                                 Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled; vendor preset: enabled)
                                 Active: active (running) since Mon 2024-04-29 16:57:54 CEST; 8min ago
                                   Docs: man:mosquitto.conf(5)
                                         man:mosquitto(8)
                                Process: 140 ExecStartPre=/bin/mkdir -m 740 -p /var/log/mosquitto (code=exited, status=0/SUCCESS)
                                Process: 142 ExecStartPre=/bin/chown mosquitto /var/log/mosquitto (code=exited, status=0/SUCCESS)
                                Process: 146 ExecStartPre=/bin/mkdir -m 740 -p /run/mosquitto (code=exited, status=0/SUCCESS)
                                Process: 147 ExecStartPre=/bin/chown mosquitto /run/mosquitto (code=exited, status=0/SUCCESS)
                               Main PID: 148 (mosquitto)
                                  Tasks: 1 (limit: 38084)
                                 Memory: 2.6M
                                    CPU: 128ms
                                 CGroup: /system.slice/mosquitto.service
                                         `-148 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
                            
                            Apr 29 16:57:54 Mosquitto systemd[1]: Starting Mosquitto MQTT Broker...
                            Apr 29 16:57:54 Mosquitto mosquitto[148]: 1714402674: Loading config file /etc/mosquitto/conf.d/access.conf
                            Apr 29 16:57:54 Mosquitto systemd[1]: Started Mosquitto MQTT Broker.
                            smarthome@Mosquitto:~$
                            
                            

                            Nun ist nur noch das Problem mit dem Befehl
                            mosquitto -h

                            smarthome@Mosquitto:~$ mosquitto -h
                            -bash: mosquitto: command not found
                            smarthome@Mosquitto:~$ sudo mosquitto -h
                            mosquitto version 2.0.11
                            
                            mosquitto is an MQTT v5.0/v3.1.1/v3.1 broker.
                            
                            Usage: mosquitto [-c config_file] [-d] [-h] [-p port]
                            
                             -c : specify the broker config file.
                             -d : put the broker into the background after starting.
                             -h : display this help.
                             -p : start the broker listening on the specified port.
                                  Not recommended in conjunction with the -c option.
                             -v : verbose mode - enable all logging types. This overrides
                                  any logging options given in the config file.
                            
                            See https://mosquitto.org/ for more information.
                            
                            smarthome@Mosquitto:~$
                            
                            

                            538675de-0740-48b1-98f5-fe05034ce048-image.png

                            Thomas BraunT Online
                            Thomas BraunT Online
                            Thomas Braun
                            Most Active
                            wrote on last edited by
                            #15

                            @marcel-drzal-0

                            mosquitto liegt offenbar nicht im PATH des Users. Siehe oben, wie man den anpassen kann.

                            Linux-Werkzeugkasten:
                            https://forum.iobroker.net/topic/42952/der-kleine-iobroker-linux-werkzeugkasten
                            NodeJS Fixer Skript:
                            https://forum.iobroker.net/topic/68035/iob-node-fix-skript
                            iob_diag: curl -sLf -o diag.sh https://iobroker.net/diag.sh && bash diag.sh

                            Marcel Drzal 0M 1 Reply Last reply
                            0
                            • Thomas BraunT Thomas Braun

                              @marcel-drzal-0

                              mosquitto liegt offenbar nicht im PATH des Users. Siehe oben, wie man den anpassen kann.

                              Marcel Drzal 0M Offline
                              Marcel Drzal 0M Offline
                              Marcel Drzal 0
                              wrote on last edited by Marcel Drzal 0
                              #16

                              @thomas-braun
                              @haus-automatisierung

                              e4457115-a4a1-4556-ab5e-85c198cc34cd-image.png

                               influxdb.1 (639) Connecting http://172.16.0.217:8086/ ...
                              2024-04-30 13:44:00.135  - info: influxdb.1 (639) Influx DB Version used: 2.x
                              2024-04-30 13:44:00.136  - error: influxdb.1 (639) HttpError: unauthorized access
                              

                              bin nun wieder an der selben stelle hängen geblieben:

                              
                              smarthome@Mosquitto:~$ sudo service mosquitto status
                              * mosquitto.service - Mosquitto MQTT Broker
                                   Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled; vendor pre>
                                   Active: failed (Result: exit-code) since Tue 2024-04-30 13:22:26 CEST; 47s>
                                     Docs: man:mosquitto.conf(5)
                                           man:mosquitto(8)
                                  Process: 813 ExecStartPre=/bin/mkdir -m 740 -p /var/log/mosquitto (code=exi>
                                  Process: 814 ExecStartPre=/bin/chown mosquitto /var/log/mosquitto (code=exi>
                                  Process: 815 ExecStartPre=/bin/mkdir -m 740 -p /run/mosquitto (code=exited,>
                                  Process: 816 ExecStartPre=/bin/chown mosquitto /run/mosquitto (code=exited,>
                                  Process: 817 ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf>
                                 Main PID: 817 (code=exited, status=1/FAILURE)
                                      CPU: 6ms
                              
                              Apr 30 13:22:26 Mosquitto systemd[1]: mosquitto.service: Main process exited, c>
                              Apr 30 13:22:26 Mosquitto systemd[1]: mosquitto.service: Failed with result 'ex>
                              Apr 30 13:22:26 Mosquitto systemd[1]: Failed to start Mosquitto MQTT Broker.
                              Apr 30 13:22:26 Mosquitto systemd[1]: mosquitto.service: Scheduled restart job,>
                              Apr 30 13:22:26 Mosquitto systemd[1]: Stopped Mosquitto MQTT Broker.
                              Apr 30 13:22:26 Mosquitto systemd[1]: mosquitto.service: Start request repeated>
                              Apr 30 13:22:26 Mosquitto systemd[1]: mosquitto.service: Failed with result 'ex>
                              Apr 30 13:22:26 Mosquitto systemd[1]: Failed to start Mosquitto MQTT Broker.
                              
                              
                              smarthome@Mosquitto:/$ export PATH=/usr/local/sbin:/usr/sbin/:$PATH
                              smarthome@Mosquitto:/$ echo $PATH
                              /usr/local/sbin:/usr/sbin/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/ga            mes
                              
                              

                              103b988c-e4c8-454a-b47b-8f439de54e8a-image.png nun muss ich sicher was angleichen da die Lampe nun nicht mehr schaltet?

                              1 Reply Last reply
                              0
                              Reply
                              • Reply as topic
                              Log in to reply
                              • Oldest to Newest
                              • Newest to Oldest
                              • Most Votes


                              Support us

                              ioBroker
                              Community Adapters
                              Donate

                              551

                              Online

                              32.7k

                              Users

                              82.4k

                              Topics

                              1.3m

                              Posts
                              Community
                              Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                              ioBroker Community 2014-2025
                              logo
                              • Login

                              • Don't have an account? Register

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Home
                              • Recent
                              • Tags
                              • Unread 0
                              • Categories
                              • Unreplied
                              • Popular
                              • GitHub
                              • Docu
                              • Hilfe