0

部署战争文件时出现错误(在标题中)。

这是我得到的 catalina.out 的日志。我猜根据第一行,我需要更改 catalina.2012-11-19.log 的权限,但怎么办?(请原谅我新手的问题)。Tks

    Listening for transport dt_socket at address: 50754
java.util.logging.ErrorManager: 4
java.io.FileNotFoundException: /usr/share/tomcat6/logs/catalina.2012-11-19.log (Permission denied)
    at java.io.FileOutputStream.openAppend(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:207)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
    at org.apache.juli.FileHandler.openWriter(FileHandler.java:304)
    at org.apache.juli.FileHandler.<init>(FileHandler.java:63)
    at org.apache.juli.FileHandler.<init>(FileHandler.java:54)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
    at java.lang.Class.newInstance0(Class.java:372)
    at java.lang.Class.newInstance(Class.java:325)
    at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:458)
    at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:403)
    at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:281)
    at java.util.logging.LogManager$2.run(LogManager.java:278)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.util.logging.LogManager.readPrimordialConfiguration(LogManager.java:276)
    at java.util.logging.LogManager.getLogManager(LogManager.java:259)
    at java.util.logging.Logger.<init>(Logger.java:245)
    at java.util.logging.LogManager$RootLogger.<init>(LogManager.java:1106)
    at java.util.logging.LogManager$RootLogger.<init>(LogManager.java:1103)
    at java.util.logging.LogManager$1.run(LogManager.java:199)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.util.logging.LogManager.<clinit>(LogManager.java:176)
    at java.util.logging.Logger.getLogger(Logger.java:307)
    at org.apache.juli.logging.DirectJDKLog.<init>(DirectJDKLog.java:71)
    at org.apache.juli.logging.DirectJDKLog.getInstance(DirectJDKLog.java:178)
    at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:171)
    at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:243)
    at org.apache.juli.logging.LogFactory.getLog(LogFactory.java:298)
    at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:55)
4

1 回答 1

0

假设您使用的是 tomcat6,只需在 /usr/share/tomcat6 中输入此命令

chown -R tomcat6 logs
chmod -R 750 logs

如果需要,对其他子目录(webapps、conf 等)执行相同操作。

于 2012-11-21T09:48:13.320 回答