a lots of (Permission denied) in catalina.out

后端 未结 3 1233
渐次进展
渐次进展 2021-02-07 17:43

How can i install Apache web server and Apache tomcat to avoid get errors like this:

java.io.FileNotFoundException: /usr/local/apache-tomcat-7.0.5/work/Catalin

3条回答
  •  逝去的感伤
    2021-02-07 18:15

    Ran into a similar situation like this with an older Tomcat-6 implementation...

    ...
    SEVERE: Error deploying web application directory host-manager
    java.io.FileNotFoundException: /opt/tomcat-6/conf/Catalina/localhost/host-manager.xml (Permission denied)
    ...
    

    And, the webapp XMLs were all there and the ownership and permissions were all "tomcat:tomcat" and "644".

    For me, the solution was to set the overall permissions to what Tomcat prefers, namely "0755".

    And, as a note for the security-conscious, the server.xml for that implementation is using a JDBC Realm for authentication, so we don't even use tomcat-users.xml. So, it is the default file that comes with the installation and even commented out the default user accounts within it (e.g. "tomcat" and "manager"). I know in Tomcat-7, the accounts in tomcat-users.xml are commented by default.

    HTH.

提交回复
热议问题