Upayavira wrote:
> Says:
>
> if (!(d.canRead() && d.canWrite())) {
> log.error("Directory '" + d + "' is not readable/writable");
> throw new IOException("Directory '" + d + "' is not
> readable/writable");
> }
>
> 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.
+1.
If Carsten agrees, it would be good for this bug fix to go in 2.1.6 so
that Forrest can close the issue with a released version of Cocoon.
Sylvain
> 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
>> http://issues.cocoondev.org//browse/FOR-356
>>
>> 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" java.io.IOException: Directory '.' is not readable/writable at
>> org.apache.cocoon.bean.CocoonWrapper.getDir(CocoonWrapper.java:253)
>> at
>> org.apache.cocoon.bean.CocoonWrapper.initialize(CocoonWrapper.java:106)
>> at org.apache.cocoon.bean.CocoonBean.initialize(CocoonBean.java:98)
>> at org.apache.cocoon.Main.main(Main.java:320)
>>
>> 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. :)
>
--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
|