You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Matthew Hailstone <ma...@waterford.org> on 2002/08/20 00:59:16 UTC

Download Server - directory access denied

I am trying to create a download server. ;) Here is the pipeline
fragment and the error page:

Environment:

Win2K
Tomcat 4.1.3
Cocoon 2.0.3
jdk 1.3.1_03

pipeline:

  <!-- Download Server -->
  <map:pipeline>
      <map:match pattern="download">
          <map:act type="request">
              <map:parameter name="parameters" value="true"/>
              <map:act type="resource-exists">
                  <map:parameter name="url" value="download/{file}"/>
                  <map:read src="download/{file}"/>
              </map:act>
              <map:generate src="filenotfound.xml"/>
              <map:transform src="filenotfound2html.xsl"/>
              <map:serialize/>
          </map:act>
      </map:match>
  </map:pipeline>


error page:

type fatal
message Failed to execute pipeline.
description org.apache.cocoon.ProcessingException: Failed to execute
pipeline.: java.io.FileNotFoundException: D:\apps\Tomcat
4.1\webapps\cocoon203\download (Access is denied)
sender org.apache.cocoon.servlet.CocoonServlet
source Cocoon servlet
stack-trace
org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
java.io.FileNotFoundException: D:\apps\Tomcat
4.1\webapps\cocoon203\download (Access is denied)
	at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.processReade
r(CachingStreamPipeline.java:278)
	at
org.apache.cocoon.components.pipeline.AbstractStreamPipeline.process(Abs
tractStreamPipeline.java:168)
	at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(Cach
ingStreamPipeline.java:293)
	at org.apache.cocoon.www.sitemap_xmap.matchN103CA(D:\apps\Tomcat
4.1\work\Standalone\localhost\cocoon203\cocoon-files\org/apache/cocoon/w
ww\sitemap_xmap.java:4766)
	at org.apache.cocoon.www.sitemap_xmap.process(D:\apps\Tomcat
4.1\work\Standalone\localhost\cocoon203\cocoon-files\org/apache/cocoon/w
ww\sitemap_xmap.java:3350)
	at org.apache.cocoon.www.sitemap_xmap.process(D:\apps\Tomcat
4.1\work\Standalone\localhost\cocoon203\cocoon-files\org/apache/cocoon/w
ww\sitemap_xmap.java:3160)
	at org.apache.cocoon.sitemap.Handler.process(Handler.java:224)
	at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
	at
org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154
)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
	at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:260)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:646)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
83)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:646)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
83)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:234
9)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:646)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:170)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:644)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:171)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:644)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
83)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:646)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
83)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:40
5)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:376)
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:50
8)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:518)
	at java.lang.Thread.run(Thread.java:479)
java.io.FileNotFoundException: D:\apps\Tomcat
4.1\webapps\cocoon203\download (Access is denied)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.(FileInputStream.java:59)
	at java.io.FileInputStream.(FileInputStream.java:90)
	at
org.apache.cocoon.components.source.FileSource.getInputStream(FileSource
.java:140)
	at
org.apache.cocoon.reading.ResourceReader.generate(ResourceReader.java:17
6)
	at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.processReade
r(CachingStreamPipeline.java:251)
	at
org.apache.cocoon.components.pipeline.AbstractStreamPipeline.process(Abs
tractStreamPipeline.java:168)
	at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(Cach
ingStreamPipeline.java:293)
	at org.apache.cocoon.www.sitemap_xmap.matchN103CA(D:\apps\Tomcat
4.1\work\Standalone\localhost\cocoon203\cocoon-files\org/apache/cocoon/w
ww\sitemap_xmap.java:4766)
	at org.apache.cocoon.www.sitemap_xmap.process(D:\apps\Tomcat
4.1\work\Standalone\localhost\cocoon203\cocoon-files\org/apache/cocoon/w
ww\sitemap_xmap.java:3350)
	at org.apache.cocoon.www.sitemap_xmap.process(D:\apps\Tomcat
4.1\work\Standalone\localhost\cocoon203\cocoon-files\org/apache/cocoon/w
ww\sitemap_xmap.java:3160)
	at org.apache.cocoon.sitemap.Handler.process(Handler.java:224)
	at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
	at
org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154
)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
	at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:260)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:646)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
83)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:646)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
83)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:234
9)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:646)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:170)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:644)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:171)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:644)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
83)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:646)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
83)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:40
5)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:376)
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:50
8)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:518)
	at java.lang.Thread.run(Thread.java:479)

request-uri
/cocoon203/download
path-info
download


The file I'm requesting is definitely there, but access to the directory
is being denied. Any thoughts?

Thanks,

Matthew

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Download Server - directory access denied

Posted by Vadim Gritsenko <va...@verizon.net>.
Matthew Hailstone wrote:

>I am trying to create a download server. ;) Here is the pipeline
>fragment and the error page:
>
>Environment:
>
>Win2K
>Tomcat 4.1.3
>Cocoon 2.0.3
>jdk 1.3.1_03
>
>pipeline:
>
>  <!-- Download Server -->
>  <map:pipeline>
>      <map:match pattern="download">
>          <map:act type="request">
>              <map:parameter name="parameters" value="true"/>
>              <map:act type="resource-exists">
>                  <map:parameter name="url" value="download/{file}"/>
>                  <map:read src="download/{file}"/>
>

Perfect fit for:

http://xml.apache.org/cocoon/faq/faq-sitemap.html#faq-7

Vadim


>              </map:act>
>              <map:generate src="filenotfound.xml"/>
>              <map:transform src="filenotfound2html.xsl"/>
>              <map:serialize/>
>          </map:act>
>      </map:match>
>  </map:pipeline>
>

...


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


AW: Download Server - directory access denied

Posted by Tammo van Lessen <cu...@taval.de>.
Hi Matthew!

| Von: Matthew Hailstone [mailto:matthew.hailstone@waterford.org]
[...]
| pipeline:
|
|   <!-- Download Server -->
|   <map:pipeline>
|       <map:match pattern="download">
|           <map:act type="request">
|               <map:parameter name="parameters" value="true"/>
|               <map:act type="resource-exists">
|                   <map:parameter name="url" value="download/{file}"/>
|                   <map:read src="download/{file}"/>
|               </map:act>
|               <map:generate src="filenotfound.xml"/>
|               <map:transform src="filenotfound2html.xsl"/>
|               <map:serialize/>
|           </map:act>
|       </map:match>
|   </map:pipeline>
|
|
| error page:
|
| type fatal
| message Failed to execute pipeline.
| description org.apache.cocoon.ProcessingException: Failed to execute
| pipeline.: java.io.FileNotFoundException: D:\apps\Tomcat
| 4.1\webapps\cocoon203\download (Access is denied)

It looks like your {file}-parameter is empty. \cocoon203\download is a
directory, not a file right? perhaps take a look into the log files and
check if the parameter gets set by the request action.

cya
  Tammo


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>