java.secunty.AccessControException: the Permission java.io.FilePermission /home/ ,read) has not been granted to testuser. The PL/SOL to grant this is dbms java.grant permission

发布时间 2023-04-04 17:57:45作者: 高昱宁

 

利用oracle的java写入服务器的文件夹文件的时候会出现类似这种报错,看到报错我们可以猜到是关于权限的问题。

 

 

 

只需要利用sys用户在sqlplus 或者 plsql的命令行模式下执行下列代码就使得对应用户获得对应目录的读、写、删的权限了。

 

exec dbms_java.grant_permission( 'testuser', 'SYS:java.io.FilePermission','/home/*', 'read,write,delete' );