prestodb / presto

The official home of the Presto distributed SQL query engine for big data
http://prestodb.io
Apache License 2.0
16.03k stars 5.37k forks source link

presto 用户权限问题 #17057

Open zhaozhen-new opened 2 years ago

zhaozhen-new commented 2 years ago

请问对于presto 的用户权限控制才有关于schema 规则的案例么,因为看到官方文档那个位置是空的 image

后来在源码中找到 schemas.json 按照上面进行配置 会报错

2021-12-03T16:49:59.065+0800 ERROR main com.facebook.presto.server.PrestoServer File does not exist: /home/hadoop/datapool/presto-server-0.264.1/data/etc/schema.json java.lang.IllegalArgumentException: File does not exist: /home/hadoop/datapool/presto-server-0.264.1/data/etc/schema.json at com.google.common.base.Preconditions.checkArgument(Preconditions.java:216) at com.facebook.presto.plugin.base.JsonUtils.parseJson(JsonUtils.java:39) at com.facebook.presto.security.FileBasedSystemAccessControl$Factory.create(FileBasedSystemAccessControl.java:138) at com.facebook.presto.security.FileBasedSystemAccessControl$Factory.create(FileBasedSystemAccessControl.java:126) at com.facebook.presto.security.AccessControlManager.setSystemAccessControl(AccessControlManager.java:150) at com.facebook.presto.security.AccessControlManager.loadSystemAccessControl(AccessControlManager.java:134) at com.facebook.presto.security.AccessControlManager.loadSystemAccessControl(AccessControlManager.java:121) at com.facebook.presto.server.PrestoServer.run(PrestoServer.java:169) at com.facebook.presto.server.PrestoServer.main(PrestoServer.java:85)

bing-h commented 2 years ago

你再仔细检查下配置文件,我是可以配置的

zhaozhen-new commented 2 years ago

你再仔细检查下配置文件,我是可以配置的

需要的配置文件我这有一个是access-control.properties 配置参数是 access-control.name=file security.config-file=etc/schema.json 您的json 文件可以给我参考一下么?

bing-h commented 2 years ago

报错提示很明显了security.config-file 配置的文件路径不对,用绝对路径