Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

file access error

Status
Not open for further replies.

sedj

Programmer
Aug 6, 2002
5,610
Hello people,

<apolgogies to those who vist the java forums as this is a duplicate post>

I am getting the below error on Tomcat which is hosted on a &quot;buy web space on our server&quot; type outfit :

java.security.AccessControlException: access denied (java.io.FilePermission /home/.sites/5/site513/web/WEB-INF/classes read)

This occurs when I am invoking a servlet from a jsp page. I'm thinking that the error is due to the permissions on directories which the servlet is trying to access (or rather lying in), but am unsure of how to negate the error. I've tryed adding a .java.policy file in my home directory on their server, and tryed fiddling about with various java.security and java.io permission classes, but to no avail. I've also checked the tomcat.policy file in TOMCAT-HOME/conf and it contains FilePermission for the correct directory. web.xml is also set up ... in the past I've always done servlet stuff on my machine at home, so am in a new world with this &quot;remote-hosting on someone else's server&quot; type malarky ... any ideas ?!

I've also tried contacting the server provider, and all they recommnend is checking out the Sun Cobalt forum !!!

Whats going on ??!!

Thanks,

Ben
 
I had the same issue.
What you have to do is in the file /etc/rc.d/init.d/tomcat.init
the line $TOMCAT_HOME/bin/statrup.sh -security
replace it by $TOMCAT_HOME/bin/statrup.sh #-security
I disable the security of tomcat for the programer.
It mean that if the programmer make a mistake
Ex : write System.exit(0); tomcat shutdown
Bye
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top