title: "error=13, Permission denied" error when running C compiled .cgi file in linux with Tomcat6
body: <p>I have enabled the CGI module in web.xml and added previleged=true in the context.xml. Placed the cgi file in the WEB-INF/cgi/ folder in my application. When trying to access the below URL I get "error=13, Permission denied" error. (http://localhost:8080/cute/cgi-bin/cutecgi.cgi)</p>
  
  <pre><code> 致命的: サーブレット cgi のServlet.service()が例外を投げました
      java.io.IOException: Cannot run program "/var/lib/tomcat6/webapps/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/cute/WEB-INF/cgi/cutecgi.cgi" (in directory "/var/lib/tomcat6/webapps/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/cute/WEB-INF/cgi"): java.io.IOException: error=13, Permission denied
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
      at java.lang.Runtime.exec(Runtime.java:593)
      at java.lang.Runtime.exec(Runtime.java:431)
      at org.apache.catalina.servlets.CGIServlet$CGIRunner.run(CGIServlet.java:1649)
      at org.apache.catalina.servlets.CGIServlet.doGet(CGIServlet.java:592)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:88)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:865)
      at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
      at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: java.io.IOException: java.io.IOException: error=13, Permission denied
      at java.lang.UNIXProcess.&lt;init&gt;(UNIXProcess.java:148)
      at java.lang.ProcessImpl.start(ProcessImpl.java:65)
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
      ... 21 more
  .
  </code></pre>