• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 305
  • Last Modified:

Permission issue when deploying JSP code to Linux server.

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
rnicholus
Asked:
rnicholus
  • 2
1 Solution
 
bloodredsunCommented:
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
 
rnicholusAuthor Commented:
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
 
rnicholusAuthor Commented:
Moderator,

Sorry about this.
Could you please close this question?

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

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now