tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Tomcat wont allow me to create files
Date Tue, 26 Feb 2013 15:09:20 GMT
Hash: SHA256


On 2/26/13 12:02 AM, André Warnier wrote:
> Hi. Do not top-post. Follow the example of the previous person who 
> answered your request.
> Elias Kopsiaftis wrote:
>> On Mon, Feb 25, 2013 at 8:39 PM, Ben Stringer <>
>> wrote:
>>> 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?
>> Hi Ben,
>> I didnt mention that but I did check that write permissions were
>> on. Currently I dont have a log4j configuration. I am just trying
>> to get
> it to
>> work.
> You need to check where log4j is (trying to) writing its logfiles.
> That is part of your log4j configuration.

Also, Elias, are you running under a SecuritManager? If so, you'll
have to adjust permissions in your policy file.

- -chris
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools -
Comment: Using GnuPG with Thunderbird -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message