-
Bug
-
Resolution: Unresolved
-
Major
The Mercurial incorrectly assumes write-access to the Mercurial installation directory, triggering the following exception:
hudson.util.IOException2: Failed to create a temp file on /usr at hudson.FilePath.createTextTempFile(FilePath.java:1163) at hudson.FilePath.createTextTempFile(FilePath.java:1114) at hudson.tools.CommandInstaller.performInstallation(CommandInstaller.java:82) at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61) at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:203) at hudson.plugins.mercurial.MercurialInstallation.forNode(MercurialInstallation.java:103) at hudson.plugins.mercurial.MercurialSCM.findHgExe(MercurialSCM.java:201) at hudson.plugins.mercurial.HgExe.<init>(HgExe.java:80) at hudson.plugins.mercurial.MercurialSCM.clone(MercurialSCM.java:554) at hudson.plugins.mercurial.MercurialSCM.checkout(MercurialSCM.java:389) at hudson.model.AbstractProject.checkout(AbstractProject.java:1324) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:676) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:581) at hudson.model.Run.execute(Run.java:1518) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) Caused by: hudson.util.IOException2: remote file operation failed: /usr at hudson.remoting.Channel@26528fa4:Ubuntu 12.04 at hudson.FilePath.act(FilePath.java:848) at hudson.FilePath.act(FilePath.java:825) at hudson.FilePath.createTextTempFile(FilePath.java:1141) ... 18 more
My configuration is as follows:
Installation directory = /usr
Executable = INSTALLATION/bin/hg
Installation Automatically using command: "sudo apt-get install mercurial"
Jenkin's user does not have general access to /usr, nor to "sudo". It only has executable permissions in /usr/bin and "sudoers" permission to "apt-get".
Expected behavior: write temporary files into the path specified by the "java.io.tmpdir" system property.
I forgot to mention, my environment is Ubuntu 12.04, 64-bit edition.