• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

exec error: Error: Command failed: ?!

Scheduled Pinned Locked Moved Troubleshooting
15 Posts 2 Posters 2.6k Views 2 Watching
Loading More Posts
  • 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.
  • S Away
    sdetweil @stoffel
    last edited by Jul 7, 2021, 5:52 PM

    @stoffel said in exec error: Error: Command failed: ?!:

    and its executable -rw-r–r–

    is NOT executable

    it needs the x flag

    now its executable xrwxr–xr–

    there are 3 bits each

    for the user themselves
    for others in the same group as the user
    and for ‘others’

    sometimes shortened to UGA

    u can set the flags with
    chmod the numbers 7 is all bits (777)
    or just for the user 766
    or read only for anyone except the user 744

    to turn on the execute flag for any and all its +x
    (to turn it off is -x)
    r and w are read and write

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    S 1 Reply Last reply Jul 7, 2021, 6:14 PM Reply Quote 0
    • S Away
      sdetweil @stoffel
      last edited by Jul 7, 2021, 5:56 PM

      @stoffel said in exec error: Error: Command failed: ?!:

      its a simple text-file

      unix is cool… ANYTHING can be executable… and a ‘script’ is just a text file with the executable flag on
      the .sh means nothing (just convention to say shell script)

      I dson’t use .sh in most of my scripts, cause its just another thing the user has to type and doesn’t help

      also, in unix, if the 1st line of the executable text file

      starts with shebang #!
      then the program to execute this ‘script’ is specified next

      #!/bin/bash 
      

      means bash will execute this program, so bash (/bin/bash) is launched and passed this script

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • S Offline
        stoffel @sdetweil
        last edited by Jul 7, 2021, 6:14 PM

        @sdetweil

        ok, i am not a linux erpert. i think the exec command execute a script, and its work with this file-attributes. you can test it. maybe its read the file and exec the commands in it. i’v checked the attributes with filezilla, was 644, not executable but it works.

        the file-attributes are for the security of RPI & MM importend. thats is for later.

        at the moment ist works without errors. i can send you my files for test !?

        S 1 Reply Last reply Jul 7, 2021, 6:16 PM Reply Quote 0
        • S Away
          sdetweil @stoffel
          last edited by Jul 7, 2021, 6:16 PM

          @stoffel not needed… exec should fail if the execute bit is not on…(it would be a security exposure to allow ‘anything’ to execute) but not my job

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          S 1 Reply Last reply Jul 7, 2021, 6:49 PM Reply Quote 0
          • S Offline
            stoffel @sdetweil
            last edited by Jul 7, 2021, 6:49 PM

            @sdetweil

            ok, what can i say. i’v test it with other config und it works also. its overide the old config with the new config and restart mm.
            i not understand why, but it works. realy

            S 1 Reply Last reply Jul 7, 2021, 7:46 PM Reply Quote 0
            • S Away
              sdetweil @stoffel
              last edited by Jul 7, 2021, 7:46 PM

              @stoffel I do this in MMM-Config, node_helper

                exec("pm2 restart " + pm2_id);
              

              after I get the id from pm2 info and find the entry that matches the path we are running under

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              S 1 Reply Last reply Jul 8, 2021, 6:19 PM Reply Quote 0
              • S Offline
                stoffel @sdetweil
                last edited by Jul 8, 2021, 6:19 PM

                @sdetweil

                i have test a lot with file attributes. not needed. magicMirror is not linux, its javascript. only the copy command and pm2 command in the exec function must linux conform. in the pm2 log you have sometimes error messages, but that comes from linux. so you have right, without x-flag its not executable, but MagicMirror ignore file attributes.

                now i can cange all my configs with remote-control. for the moment i am finished this module. maybe later i have a new idea, ha,ha.

                1 Reply Last reply Reply Quote 0
                • 1
                • 2
                • 2 / 2
                2 / 2
                • First post
                  13/15
                  Last post
                Enjoying MagicMirror? Please consider a donation!
                MagicMirror created by Michael Teeuw.
                Forum managed by Sam, technical setup by Karsten.
                This forum is using NodeBB as its core | Contributors
                Contact | Privacy Policy