tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Stringer <>
Subject Re: Tomcat wont allow me to create files
Date Tue, 26 Feb 2013 01:39:10 GMT

On 26/02/2013, at 12:14 PM, Elias Kopsiaftis <> 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:
For additional commands, e-mail:

View raw message