Hudson as service on Windows - file system permissions -


For a few months we have run a Hudson on a Windows XP "server" under a user account. This means that someone logs in manually and starts Hudson through a .bat file (which sets some environment variables, then runs java -jar hudson.war)

However, as a result of some recent power cuts, Hudson must start automatically when the server boots, so I've seen Hudson run it as a Windows service. This will allow Hudson to start automatically with Windows, and no specific user account will be required.

I have managed to set it up as a service, and I have changed Hudson.XML so that the batch file is run directly instead of Java. I do this because we have GIT on Sigwin And build backups to Java / Hudson before ShellPTS = Egator should be set up.

This service is starting properly, and the web interface is present and functional. However, it appears that a user who is currently operating under Hudson is unable to write / modify existing jobs in C: \ Hudson:

  FATAL: Checkout 4a121704f178123c36f6ab4e861b3c77195b187 hudson Plugins.git.GitException: Hudson.Plugin at checkout 4a121704f178123c36f6ab4e861b3c771953 18187 at Hudson.plugins.git. Gate.Get.pi.checkout (GTAPI.Java 382) could not be done. Hudson.plin.GT In $ 4.in Wock (GTSSM.Java TSS 29). GitskMM $ 4 Hudson.Headson.model.AbstractProject.checkout at Huffman.model.AbstractProject.checkout (Hubbson.model.AbstractProject.checkout) at Handson.flgins.it.flugin.gif.gif.scm (GitSCM.java; 21)) at Phillipeth.tt (Phillipath.Java: 660) .java: 833) at hudson.model.AbstractBuild $ AbstractRunner.checkout (AbstractBuild.java.34) hudson.model.AbstractBuild $ AbstractRunner.run (AbstractBuild.java movies66) at Hudson.model.Run.run (run.java : 9 48) on Hudson. Modell.Bld.R. (Build.Java 12) generated by hudson.model.ResourceController.execute (ResourceCo Ntroller.java:93) at hudson.model.Executor.run (Examiner .Java 18): hudson.plugins.git GitException: To display error: cit: // cygwin \ bin \ git.exe checkout -f4a121704f178123c36f6ab4e861b3c771953e187 Hudson on .plugins.git.GitAPI.launchCommandIn (GitAPI.java.302) at hudson.plugins.git.GitAPI.launchCommand (GitAPI .java.776) at hudson.plugins.git.GitAPI.checkout (GitAPI.java:380). .. 12 more reasons: hudson.plugins.git.GitException: Command Back Status Code 1: Error: GIT checkout-index: Unable to create file .gitignore (permission denied) Error: git checkout-index: Unable to create file Gitmodules (Deprecated with permission) Error: GIT checkout-index: Unable to create file Makefile (Permission denied)  

I'm not really a Windows type person, but I thought if I added User "LOCAL_S "Full access" security permissions for C: \ Hudson for ERVICE, then he can fix it. Regrettably, it was not that I also tried full permission for the "everyone" user, but he did not even solve the problem.

What am I missing here? Is there a way to allow a service to run as a unrestricted access to a subdirectory on a local disk?

How do you change the user whose service is running, create a new "technical" user account No one knows whose password (except for an envelope in your safe) and make this user the owner of all your Hudson job folders. The advantage of this is that you can take permission away from Hudson. Hudson's job thus can not work as an administrator on your Windows machine.

The advantage of a service compared to the scheduled job is that it restarts when it crashes.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -