记录文件appender无法创建文件

时间:2017-05-23 09:49:01

标签: unix logging file-permissions

当logback尝试创建要记录的文件时,我收到此错误消息:

-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[file-appender] - 
   Failed to create parent directories for [/var/log/living/commty/logFile.log]
-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[file-appender] - 
    openFile(/var/log/living/commty/logFile.log,true) call failed. 
    java.io.FileNotFoundException: /var/log/living/commty/logFile.log (Permission denied)

尽管如此:

ls /var/log/living/commty/ -lha
total 8.0K
drw-r----- 2 wildfly wildfly 4.0K May 23 09:29 .   <<<<<<<<<<<<
drw-r----- 6 wildfly wildfly 4.0K May 23 09:29 ..

您可以看到/var/log/living/commty拥有wildfly:wildfly并且rw-r-----read-write访问权限。)

有什么想法吗?

0 个答案:

没有答案