On 19.08.2004 16:31, Shapira, Yoav wrote:
Hola,
This is typical of when apps step outside the Servlet Spec, which does
not include support for apps writing files except to a temporary
directory where permissions are guaranteed to be readable back by the
app and no more.

Tomcat supports running with a security manager, but you have to tell it
so explicitly by specifying -security when launching Tomcat.  If you're
doing this, you will need to modify your java security policy to include
setting file permissions.  But my guess is you're running without a
security manager, which is OK and the default.

So Runtime.exec should work.  You will need to pass it the complete path
to the file, as you cannot rely on the concept of "current working
directory" to be portable.  Runtime.exec is also a security risk in most
environments.

Thats what I thought ... and as you can see from my original posting I am passing the full path to chmod and the full path to the file when calling exec() ...


The thing is: I can see that chmod itself seems to do something, but in a completely weird and unwanted way ... why should it work when I want to set the permission to 007 (which actually is working - even from within the application) But not, when I want to ste the permissions to 660

This seems totally unpredictable and unexplainable to me :-(

Any more hints?

But maybe I can try it with the security option tomorrow

Christian
--
To reply to this posting directly use the following address and
remove the 'NO-SPAM' part: [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to