在 Oracle 中授予“创建目录”权限
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1058756/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Granting "Create Directory" Privileges in Oracle
提问by Nipun
I want to run a CREATE DIRECTORY
query in Oracle 10, but it's giving me an insufficient privileges error.
我想CREATE DIRECTORY
在 Oracle 10 中运行一个查询,但它给了我一个权限不足的错误。
Can anybody tell me how to grant this privilege to my user through the system as a user?
谁能告诉我如何以用户身份通过系统向我的用户授予此权限?
回答by Vincent Malgrat
From the Oracle 10gR2 documentation:
You must have CREATE ANY DIRECTORY system privilege to create directories.
您必须具有 CREATE ANY DIRECTORY 系统权限才能创建目录。
You would use the following command to grant the privilege to the schema that will create the directory:
您将使用以下命令向将创建目录的架构授予权限:
SQL> GRANT CREATE ANY DIRECTORY TO vnz;
Grant succeeded
As always with the privileges ANY
, be careful who you will grant them to. It is indeed a powerful privilege best left to DBAs.
与特权一样ANY
,请注意将它们授予给谁。这确实是最好留给 DBA 的强大特权。
回答by dpbradley
From Oracle docs:
来自 Oracle 文档:
"You must have CREATE ANY DIRECTORY system privilege to create directories."
“您必须具有 CREATE ANY DIRECTORY 系统权限才能创建目录。”
So,
所以,
grant create any directory to userOfInterest;
向 userOfInterest 授予创建任何目录的权限;