Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-45840

Permission issue when using "Extract *.zip/*.tar.gz" installer

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: nodejs-plugin
    • Labels:
      None
    • Environment:
      Jenkins:2.60.2
      NodeJS:1.2.2
    • Similar Issues:

      Description

      Issue

      When using the automatic installer of type "Extract .zip/.tar.gz" for NodeJS ( see tool-config.png) and use it in the NodeSJ script step in a freestyle job (see job-config.png), this results in a Permission Denied exception:

      Started by user admin
      Building in workspace /tmp/je-1-home/workspace/testFreestyle
      Unpacking https://nodejs.org/dist/v6.11.1/node-v6.11.1-linux-x64.tar.gz to /tmp/je-1-home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/node-001 on Jenkins
      [testFreestyle] $ /var/folders/m7/lghwdpdx70d6454dsp825bxc0000gn/T/hudson7136647660096639963.js
      FATAL: command execution failed
      java.io.IOException: Cannot run program "/var/folders/m7/lghwdpdx70d6454dsp825bxc0000gn/T/hudson7136647660096639963.js" (in directory "/tmp/je-1-home/workspace/testFreestyle"): error=13, Permission denied
      	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
      	at hudson.Proc$LocalProc.<init>(Proc.java:245)
      	at hudson.Proc$LocalProc.<init>(Proc.java:214)
      	at hudson.Launcher$LocalLauncher.launch(Launcher.java:850)
      	at hudson.Launcher$ProcStarter.start(Launcher.java:384)
      	at hudson.Launcher$ProcStarter.join(Launcher.java:395)
      	at jenkins.plugins.nodejs.NodeJsCommandInterpreter.perform(NodeJsCommandInterpreter.java:84)
      	at jenkins.plugins.nodejs.NodeJsCommandInterpreter.perform(NodeJsCommandInterpreter.java:42)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:735)
      	at hudson.model.Build$BuildExecution.build(Build.java:206)
      	at hudson.model.Build$BuildExecution.doRun(Build.java:163)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:490)
      	at hudson.model.Run.execute(Run.java:1735)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:405)
      Caused by: java.io.IOException: error=13, Permission denied
      	at java.lang.UNIXProcess.forkAndExec(Native Method)
      	at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
      	at java.lang.ProcessImpl.start(ProcessImpl.java:134)
      	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
      	... 16 more
      Build step 'Execute NodeJS script' marked build as failure
      Finished: FAILURE
      

      Workaround

      Use the [Custom Tools plugin](https://plugins.jenkins.io/custom-tools-plugin) and a Shell step
      Use Pipeline

        Attachments

          Activity

          allan_burdajewicz Allan BURDAJEWICZ created issue -
          nfalco Nikolas Falco made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Not A Defect [ 7 ]
          nfalco Nikolas Falco made changes -
          Issue Type Improvement [ 4 ] Bug [ 1 ]
          nfalco Nikolas Falco made changes -
          Resolution Not A Defect [ 7 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          nfalco Nikolas Falco made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              nfalco Nikolas Falco
              Reporter:
              allan_burdajewicz Allan BURDAJEWICZ
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: