cant create directory

inside a servlet i want to create a directory on a tomcat 4.1.30-server.

String path=docRoot+"events/"+event.getId()+"/";

File newDir=new File(path);

if (!newDir.exists()){

boolean result=newDir.mkdirs();

log("RESULT:"+result);

}

the logged result is always false and the folder is not created.

in the tomcat.policy-file i have the following entry:

grant{

permission java.io.FilePermission"/home/virtual/site189/fst/var/www/html/-","read,write,delete";

};

the mod of the folder, where i want to create that directory in, is 777 (all permissions set).

am i having a wrong tomcat.policy? do i have to use a codebase?

regards,

konrad

[1059 byte] By [curtis717a] at [2007-10-2 5:16:19]
# 1
What does the variable "path" contain?Does it contain the full path?Secondly, Tomcat server would be running in a specific User account. Are you sure that this User has proper access priveledge to create directories?Thanks and regards,Pazhanikanthan. P
pazhanikanthana at 2007-7-16 1:18:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
path contains the correct full path.where else than in tomcat.policy i can set access privileges?
curtis717a at 2007-7-16 1:18:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
You should look into whether it is an issue that needs to be resolved at the operating system level. Ensure that the user under which Tomcat is running has the privileges to delete the directory.-Bryan
bjb1440a at 2007-7-16 1:18:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
as i wrote, the parent directory has the mod 777, so all users have all privileges...
curtis717a at 2007-7-16 1:18:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...