Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-29532 - Create dynamic folder/directory on Oracle Server

353545Apr 15 2008 — edited Sep 29 2008
My Java Stored Procedure needs to dynamically create sub-folders on the Oracle Server during run-time. I gave the following GRANT:

EXEC DBMS_JAVA.GRANT_PERMISSION('W410', 'SYS:java.io.FilePermission',
'E:\TMP\ORACLE\DIRECTORIES\ARC\*', 'read,write,delete');

I also tried:

EXEC DBMS_JAVA.GRANT_PERMISSION('W410', 'SYS:java.io.FilePermission',
'E:\TMP\ORACLE\DIRECTORIES\ARC\-', 'read,write,delete');

(notice the "-" instead of "*" in the second one)


My expectation is that the procedure should be able to create sub-folders underneath "ARC" directory. When I try to create a sub-folder called "myarchive" it blows up with this error:

ORA-29532: Java call terminated by uncaught Java exception: java.security.AccessControlException: the Permission
(java.io.FilePermission E:\TMP\ORACLE\DIRECTORIES\ARC\myarchive write) has not been granted to W410.
The PL/SQL to grant this is dbms_java.grant_permission( 'W410', 'SYS:java.io.FilePermission',
'E:\TMP\ORACLE\DIRECTORIES\ARC\myarchive', 'write' )

It seems like Oracle is suggesting that I keep granting permissions to individual folders. The folders are created only during run-time and so I need to set permissions in such a way that the top-level directory's permissions are passed on to all the sub-folders that are about to be created at run-time. How can this be accomplished?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 27 2008
Added on Apr 15 2008
3 comments
1,067 views