views:

128

answers:

1

I have a log4j.properties file as part of my application.

#Updated at Thu Apr 01 14:30:43 GST 2010
#Thu Apr 01 14:30:43 GST 2010 
log4j.rootLogger=INFO, stdout, R
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=/home/hussain/mydata/logs/cfm.log
log4j.appender.R.MaxFileSize=100KB
log4j.appender.R.MaxBackupIndex=5
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%-5p %c %d{ISO8601} %m %n
log4j.logger.com.ahs=DEBUG 

My tomcat is deployed on ubuntu 10 ... when ever i start tomcat i see following error in my catalina.out log file.

log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /home/hussain/mydata/logs/cfm.log (Permission denied)

How can i resolve this issue ??

+2  A: 

The user under which Tomcat runs does not have the write permission to that specific file.

You have to check permissions on the folder /home/hussain/mydata/logs and give write permissions

JoseK