On an Ubuntu server 14.04 I've upgraded my Stash to 3.1.3. I've update the MySql to the latest 5.6.19. And as far I can tell the permissions are all correct. If I look the file mentioned below in the log actually exists even though the error is saying that it couldn't write it. I'm still getting the following error:
2014-07-21 15:57:31,220 INFO [localhost-startStop-1] c.a.s.i.server.BuildInfoLogger Starting Stash 3.1.3 (faa46f8 built on Wed Jul 09 01:29:27 EDT 2014)
2014-07-21 15:57:31,224 INFO [localhost-startStop-1] c.a.s.i.server.BuildInfoLogger JVM: Oracle Corporation OpenJDK 64-Bit Server VM 1.7.0_55-b14
2014-07-21 15:57:32,414 INFO [localhost-startStop-1] c.a.s.internal.home.HomeLockAcquirer Successfully acquired lock on home directory /home/apex/stash-home for 2182@git
2014-07-21 15:57:44,620 INFO [localhost-startStop-1] c.a.s.internal.home.HomeLockAcquirer Releasing lock on /home/apex/stash-home
2014-07-21 15:57:44,623 INFO [localhost-startStop-1] c.a.s.i.server.BuildInfoLogger Stash 3.1.3 has shut down
2014-07-21 15:57:44,628 ERROR [localhost-startStop-1] o.s.web.context.ContextLoader Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hookService': Invocation of init method failed; nested exception is java.io.IOException: Hook support scripts could not be written to /home/apex/stash-home/bin/git-hooks
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:136) ~[spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760) ~[spring-context-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) ~[spring-context-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) ~[spring-web-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) ~[spring-web-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) [spring-web-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_55]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_55]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_55]
... 16 frames trimmed
Caused by: java.io.IOException: Hook support scripts could not be written to /home/apex/stash-home/bin/git-hooks
at com.atlassian.stash.internal.hook.DefaultHookService.installHookScripts(DefaultHookService.java:175) ~[stash-service-impl-3.1.3.jar:na]
at com.atlassian.stash.internal.hook.DefaultHookService.startup(DefaultHookService.java:119) ~[stash-service-impl-3.1.3.jar:na]
... 9 common frames omitted
Caused by: java.io.IOException: /home/apex/stash-home/bin/git-hooks/hook-callback.pl could not be set executable.
at com.atlassian.stash.internal.hook.DefaultHookService.installHookScript(DefaultHookService.java:145) ~[stash-service-impl-3.1.3.jar:na]
at com.atlassian.stash.internal.hook.DefaultHookService.installHookScripts(DefaultHookService.java:172) ~[stash-service-impl-3.1.3.jar:na]
... 10 common frames omitted
2014-07-21 15:57:44,633 ERROR [localhost-startStop-1] c.a.j.s.w.c.JohnsonContextLoaderListener The Spring WebApplicationContext could not be started
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hookService': Invocation of init method failed; nested exception is java.io.IOException: Hook support scripts could not be written to /home/apex/stash-home/bin/git-hooks
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:136) ~[spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760) ~[spring-context-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) ~[spring-context-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) ~[spring-web-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) ~[spring-web-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) [spring-web-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_55]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_55]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_55]
... 16 frames trimmed
Caused by: java.io.IOException: Hook support scripts could not be written to /home/apex/stash-home/bin/git-hooks
at com.atlassian.stash.internal.hook.DefaultHookService.installHookScripts(DefaultHookService.java:175) ~[stash-service-impl-3.1.3.jar:na]
at com.atlassian.stash.internal.hook.DefaultHookService.startup(DefaultHookService.java:119) ~[stash-service-impl-3.1.3.jar:na]
... 9 common frames omitted
Caused by: java.io.IOException: /home/apex/stash-home/bin/git-hooks/hook-callback.pl could not be set executable.
at com.atlassian.stash.internal.hook.DefaultHookService.installHookScript(DefaultHookService.java:145) ~[stash-service-impl-3.1.3.jar:na]
at com.atlassian.stash.internal.hook.DefaultHookService.installHookScripts(DefaultHookService.java:172) ~[stash-service-impl-3.1.3.jar:na]
... 10 common frames omitted
2014-07-21 15:57:44,699 ERROR [localhost-startStop-1] c.a.j.s.w.c.s.JohnsonHttpRequestHandlerServlet Bypassing HttpRequestHandlerServlet [fileServerServlet] initialisation; Spring initialisation failed: The Spring WebApplicationContext could not be started
2014-07-21 15:57:44,699 ERROR [localhost-startStop-1] c.a.j.s.w.c.s.JohnsonHttpRequestHandlerServlet Bypassing HttpRequestHandlerServlet [scmServlet] initialisation; Spring initialisation failed: The Spring WebApplicationContext could not be started
2014-07-21 15:57:44,699 ERROR [localhost-startStop-1] c.a.j.s.w.c.s.JohnsonHttpRequestHandlerServlet Bypassing HttpRequestHandlerServlet [streamsEmptyActivityServlet] initialisation; Spring initialisation failed: The Spring WebApplicationContext could not be started
2014-07-21 15:57:44,701 ERROR [localhost-startStop-1] c.a.j.s.w.s.JohnsonDispatcherServlet Bypassing SpringMVC dispatcher [spring-mvc] initialisation; Spring initialisation failed: The Spring WebApplicationContext could not be started