Tomcat permissions to access local folder
时间:2007-11-16 来源:linxh
本文转自: http://ubuntuforums.org/showthread.php?t=371205
I'm trying to grant read permissions to a local folder from a web service, but even though I've added the following
Code:
grant codeBase "file:/home/fernando/movies" { permission java.io.FilePermission "<<ALL FILES>>", "read"; }; grant codeBase "file:/home/fernando/movies/*" { permission java.io.FilePermission "<<ALL FILES>>", "read"; };into the catalina.policy file I'm not able to put it to work. Any ideas? ========================================== Just fixed it, it is as easy as creating a file like AXIS.policy under /etc/tomcat5/policy.d, and adding to it something like:
Code:
With the above code what you grant is reading permissions to any class loaded by tomcat.
Hope this helps anyone with little knowledge about AXIS (my case).
grant{ permission java.io.FilePermission "yourLocalFolder", "read"; };This would be automatically added to catalina.policy when tomcat is restarted.
With the above code what you grant is reading permissions to any class loaded by tomcat.
Hope this helps anyone with little knowledge about AXIS (my case).
相关阅读 更多 +