logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rakesh Patel <rakesh.mailgro...@gmail.com>
Subject Re: Log4j permissions
Date Thu, 17 Aug 2006 08:51:08 GMT
The problem has something to do with the app server and the java 
security settings. It seems to be log4j that triggers it.

The error I was getting was about propertyfile permissions. I got it 
when i uncommented the SMTPAppender. Why that appender, i don't know.

This is what I added to the server.policy file in the app server to get 
rid of that problem:

grant {
    permission java.util.PropertyPermission "*", "read,write";
};

The other problem relates to RollingFileAppender and deleting the last 
file. That issue is still outstanding. I'll try and post the error 
message when i get it but i think by default, log4j (or any jar) cannot 
delete files on the OS.

Cheers

R

James Stauffer wrote:

> I have not had any problems with this.  Please give more details on
> your environment.  Are you use the user that runs the app server has
> the correct OS permissions?
>
> On 8/16/06, Rakesh Patel <rakesh.mailgroups@gmail.com> wrote:
>
>> Hi,
>>
>> I hope someone can help. It seems that log4j is not allowed to do
>> certain things with the default java security permissions that come with
>> my app server.
>>
>> Can someone show me what they typically add to give log4j permissions?
>> I'm having problems with deleting files using the rollingfileappender
>> and sending emails with the smtpappender.
>>
>> I know this is not log4j-specific but to do with java permissions in
>> general, but i found the java docs quite light on this.
>>
>> Thanks
>>
>> Rakesh
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message