Link to home
Start Free TrialLog in
Avatar of rnicholus
rnicholus

asked on

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)
ASKER CERTIFIED SOLUTION
Avatar of bloodredsun
bloodredsun
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rnicholus
rnicholus

ASKER

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.
Moderator,

Sorry about this.
Could you please close this question?

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