tomcat7部署war,jar写权限无法获得# Java - 爪哇娇娃
y*e
1 楼
接手了一个别人的项目,目前功能部分已经调通了,现在前端部署遇到了一些问题。前
端才用zk,zk里面嵌入一些java code。
整个page,data打包成DCL.war,我把它拷贝到/var/lib/tomcat7/webapps/下面,chmod
to 755, chown to tomcat7:tomcat7.运行localhost:8080/DCL/解压,页面正常显示~
但是运行提交页面的时候出现java.io.FileNotFoundException: cache.csv (Permissi
on denied)
这个cache.csv.是从我的某个jar写出来的,我改了相应目录的权限好像还是不行,我在
‘/etc/tomcat7/policy.d/03catalina.policy’加入了写权限:
grant codeBase "file:${catalina.base}/webapps/DCL.war" {
permission java.security.AllPermission;
permission java.io.FilePermission "file:${catalina.base}/webapps/DCL/-", "
read, write";
}
grant {
permission java.io.FilePermission "file:${catalina.base}/webapps/DCL/WEB-I
NF/lib/-", "read, write";
}
好像还是,不知道问题出在哪里。
大家帮忙看看哈~~
谢谢!
端才用zk,zk里面嵌入一些java code。
整个page,data打包成DCL.war,我把它拷贝到/var/lib/tomcat7/webapps/下面,chmod
to 755, chown to tomcat7:tomcat7.运行localhost:8080/DCL/解压,页面正常显示~
但是运行提交页面的时候出现java.io.FileNotFoundException: cache.csv (Permissi
on denied)
这个cache.csv.是从我的某个jar写出来的,我改了相应目录的权限好像还是不行,我在
‘/etc/tomcat7/policy.d/03catalina.policy’加入了写权限:
grant codeBase "file:${catalina.base}/webapps/DCL.war" {
permission java.security.AllPermission;
permission java.io.FilePermission "file:${catalina.base}/webapps/DCL/-", "
read, write";
}
grant {
permission java.io.FilePermission "file:${catalina.base}/webapps/DCL/WEB-I
NF/lib/-", "read, write";
}
好像还是,不知道问题出在哪里。
大家帮忙看看哈~~
谢谢!