On 26/02/2013, at 12:14 PM, Elias Kopsiaftis <yemi...@gmail.com> wrote:

> I am running a webapp on Tomcat 7 and I am using log4j for logging.
> However, log4j cannot create a log file and Im getting a permission denied
> error in the catalina.out file. I am runnning on linux, and made sure that
> the current working directory(which I got by printing it from within the
> application), /var/lib/tomcat7, and all its subdirectories were in the
> tomcat7 group, which should give the web app permissions to create files,
> but its not working. any suggestions?

Hi Elias,

That directory will also need "group write" permission set. Best way to work 
through this problem is to "sudo" to the userid that will be running tomcat, 
then try and create a file in that directory from the shell.

If it is the group write that is missing, this command will add it:

chmod g+w /var/lib/tomcat7

But that is not where you should be writing logs. /var/log is a conventional 
place to keep logs. What is your log4j configuration?

Cheers, Ben
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to