cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira>
Subject Re: [cli] Problem / Question with context directory needing to be writable
Date Fri, 12 Nov 2004 21:14:17 GMT

if (!(d.canRead() && d.canWrite())) {
            log.error("Directory '" + d + "' is not readable/writable");
            throw new IOException("Directory '" + d + "' is not 

Hmm. This has been in the CLI since Cocoon 2.0. I've no idea why it is 
there. Assuming that everything still works after removing the 
d.canWrite(), I'm quite happy with it being removed.

Regards, Upayavira

Rick Tessner wrote:

>  Hi all,
>  Over in the Forrest world, we've stumbled across an issue with the
>  Cocoon CLI. It appears that the CLI requires that the context
>  directory (--contextDir option to the cocoon cli) be writable by the
>  CLI process. For reference, see
>  The Use Case ------------ This applies to any Cocoon CLI based
>  application that can be run as a servlet as well. I'll just use
>  Forrest as the example case.
>  Forrest is installed on a multiuser system with the intent that
>  multiple users will be running the application.
>  The Problem ----------- User runs "forrest run" which runs Forrest in
>  a local servlet container (jetty) as a live application. This works
>  just fine.
>  User runs "forrest site" which uses the Cocoon CLI and is presented
>  with a Cocoon error about the context directory not being
>  readable/writable. The context directory is certainly readable. It
>  is not writable tho.
>  The stack-trace is as follows: ERROR 2004-11-11 18:32:20.353 [
>  ] (): Directory '.' is not readable/writable Exception in thread
>  "main" Directory '.' is not readable/writable at
>  org.apache.cocoon.bean.CocoonWrapper.getDir(
>  at
>  org.apache.cocoon.bean.CocoonWrapper.initialize(
>  at org.apache.cocoon.bean.CocoonBean.initialize(
>  at org.apache.cocoon.Main.main(
>  The Question ------------ Since the local servlet instance works fine
>  with the context directory being non-writable, I'm wondering if there
>  is some requirement that the context directory is writable when
>  running the Cocoon CLI?
>  If the answer is "no, there is no requirement that the context
>  directory is writable by the Cocoon CLI", I'll open an issue in
>  bugzilla and provide a patch. (I'm hoping this is the case since
>  making the context directory for Cocoon writable to all users doesn't
>  leave me with a warm fuzzy feeling. :)

View raw message