views:

200

answers:

1

I'm trying to deploy a web app located in my home directory using the tomcat manager app (through its web interface) and get the following error:

java.io.FileNotFoundException: /home/rick/projects/my-web-app/build/war (Permission denied)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:137)
        at org.apache.catalina.manager.ManagerServlet.copyInternal(ManagerServlet.java:1644)
        at org.apache.catalina.manager.ManagerServlet.copy(ManagerServlet.java:1605)
        at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:819)
        at org.apache.catalina.manager.HTMLManagerServlet.deployInternal(HTMLManagerServlet.java:285)
        at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:118)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
        at java.lang.Thread.run(Thread.java:636)

The war directory contains the WEB-INF directory. The permissions on the build directory is like this:

drwxr-xr-x. 4 tomcat tomcat 4096 2010-05-24 19:52 .
drwxrwxr-x. 8 rick   rick   4096 2010-06-01 21:16 ..
drwxr-xr-x. 4 tomcat tomcat 4096 2010-05-24 19:52 war

I do not understand the permission denied error. What other permissions does it need?

If I instead put the war directory inside /var/lib/tomcat6/webapps/ it works.

related questions