I'm using tomcat security manager for my application. In my application, i have placed my running tomcat in
path: usr/local/tomcat-7/webapps/myapplication
And when i run my application i will logged all the actions in logger. That logger file is placed in another path
path:usr/local/tomcat-6/logs/mylogs.log (*this is not running server, just a folder named tomcat-6*)
When i run my application with security manager, it will throw this exception:
java.security.AccessControlException:access denied("java.io.FilePermission" "usr/local/tomcat6/logs/mylogs.log" "write" ).
In My catalina.policy file i have gave this rule to grant permission to this file. But it doesn't works.
grant codeBase "file:${catalina.home}/../tomcat-6/logs/-" {
permission java.security.AllPermission;
};
How can i resolve this problem?
1: Login as root user
2: Go to logs
directory
3: chmod 644 mylogs.log
Change your java permission. read this enter link description here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.