?
Solved

Permission issue when deploying JSP code to Linux server.

Posted on 2006-05-31
4
Medium Priority
?
303 Views
Last Modified: 2010-05-18
I tested my jsp codes in my local machine and it works great.

I then deploy the code to a linux server and encounter the error below.
I'm not sure how to approach this situation. I gave the permission for user and group to be rwx for myFile.jsp also for the directories where the file kept.

Any advice?
Thanks in advance for the help.

------------------------------------------------------------------------
java.io.FileNotFoundException: /usr/local/apache-tomcat-5.5.15/work/Catalina/localhost/myDirectory/org/apache/jsp/myFile_jsp.java (Permission denied)
      java.io.FileOutputStream.open(Native Method)
      java.io.FileOutputStream.<init>(FileOutputStream.java:179)
      java.io.FileOutputStream.<init>(FileOutputStream.java:70)
      org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:140)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
      org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:585)
      org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
      java.security.AccessController.doPrivileged(Native Method)
      javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
      org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
      org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
0
Comment
Question by:rnicholus
  • 2
3 Comments
 
LVL 29

Accepted Solution

by:
bloodredsun earned 1500 total points
ID: 16802752
I does appear that it is a permissions issue. Your jsp is compiled into the java class and it is this that appears to be causing a problem. So can you double check your permissions allows Tomcat to compile the jsp into a java file and the java file into a class.

I notice that you have an odd capitalisation in the jsp name "myFile" you might want to check that there are no floating copies of similar files such as "MyFile_jsp.java" or "myfile_jsp.java"
0
 

Author Comment

by:rnicholus
ID: 16802811
Other jsp application using the same tomcat doesn't have this problem. I was thinking that the permission issue could be in the directory permission instead of tomcat permission?
I'll take a look again.
0
 

Author Comment

by:rnicholus
ID: 16985948
Moderator,

Sorry about this.
Could you please close this question?

The problem is in the permission of this directory:
work\Catalina\localhost\myApp

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
Social messanging services like WhatsApp and Facebook can help businesses in ways that many owners don't even imagine, giving new opportunities to connect with customers. Discover some of the most innovative things they can do for your company.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month13 days, 12 hours left to enroll

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question