Creating a directory from a webapp

2010-03-04 Thread Florent Georges
Hi, Within my webapp, I try to create a new directory on the file system by using File.mkdir(). This webapp has the permissions read write on the parent directory: grant codeBase file:${catalina.base}/webapps/myapp/- { permission java.io.FilePermission /somewhere/-, read,write;

Re: Creating a directory from a webapp

2010-03-04 Thread Peter Crowther
On 4 March 2010 10:40, Florent Georges li...@fgeorges.org wrote: Hi, Within my webapp, I try to create a new directory on the file system by using File.mkdir(). This webapp has the permissions read write on the parent directory: grant codeBase file:${catalina.base}/webapps/myapp/- {

Re: Creating a directory from a webapp

2010-03-04 Thread Konstantin Kolinko
2010/3/4 Florent Georges li...@fgeorges.org:  Is there anything else I could check out?  I cannot find any clue of what I did wrong. File.mkdir() Try with File.mkdirs() Note, that catalina.policy is only used when you are running with a SecurityManager enabled. (Many people run without it).

Re: Creating a directory from a webapp

2010-03-04 Thread Florent Georges
Konstantin Kolinko wrote: Is there anything else I could check out? I cannot find any clue of what I did wrong. File.mkdir() Try with File.mkdirs() Thanks. But the parent dir does exists and yes, I've tried that without success ;-) Note, that catalina.policy is only used when you

Re: Creating a directory from a webapp

2010-03-04 Thread Konstantin Kolinko
2010/3/4 Florent Georges li...@fgeorges.org:  Is there a simple way to disable the security manager in order to be sure this is such an issue? There is a setting somewhere. I do not run Ubuntu and thus do not know exactly, but it was mentioned several times in the archives of this list. At

Re: Creating a directory from a webapp

2010-03-04 Thread Florent Georges
Konstantin Kolinko wrote: At least, you can replace your catalina.policy with grant { permission java.security.AllPermission; }; Good to know, thanks for the hint! In the meantime, using strace, I figured out what the problem was: as simple as a wrong owner of one of the parent

Re: Creating a directory from a webapp

2010-03-04 Thread Peter Crowther
On 4 March 2010 15:43, Florent Georges li...@fgeorges.org wrote: In the meantime, using strace, I figured out what the problem was: as simple as a wrong owner of one of the parent directories. I must admit I am not really proud of this, but well, there is no diagnostic at all with mkdir() :-(