使用tomcat管理器部署时如何避免拒绝权限?

时间:2010-06-01 19:44:28

标签: tomcat permissions tomcat-manager

我正在尝试使用tomcat管理器应用程序(通过其Web界面)部署位于我的主目录中的Web应用程序,并收到以下错误:

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)

war目录包含WEB-INF目录。构建的权限 目录是这样的:

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

我不明白权限被拒绝错误。还有什么其他权限呢 需要?

如果我将war目录放在/ var / lib / tomcat6 / webapps /中,它就可以了。

0 个答案:

没有答案