Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on 05-07-2016 01:07 PM - edited 09-16-2022 03:17 AM
Hi,
is it a bug, or a desired feature that the create external table (or change location of external table) is allowed only for serveradmin roles?
Based on the documentation the database ALL permission should be sufficient, but there is a statement that also the URI should be accessible.
However when I change my test user permission and remove serveradmin, he cannot create an external table pointing to his home directory such like this:
create table part ( i int, s string ) stored as textfile location '/user/testuser/part';
ERROR: AuthorizationException: User '[email protected]' does not have privileges to access: hdfs://hdfscluster/user/testuser/part
After enabling the serveradmin right for testuser the command executes correctly and the table is created.
Any hints on this?
Thanks
Created on 08-17-2016 12:26 AM - edited 08-17-2016 12:28 AM
Hi,
I think sentry check if your user have specific permission on the "LOCATION" URI you have provided (and this is not related to HDFS ACL).
Try to grant, in sentry, that permission too.
For example :
GRANT ALL ON URI 'hdfs://hdfscluster/user/testuser/part' TO ROLE <a_role>;
regards,
mathieu
Created on 08-17-2016 12:26 AM - edited 08-17-2016 12:28 AM
Hi,
I think sentry check if your user have specific permission on the "LOCATION" URI you have provided (and this is not related to HDFS ACL).
Try to grant, in sentry, that permission too.
For example :
GRANT ALL ON URI 'hdfs://hdfscluster/user/testuser/part' TO ROLE <a_role>;
regards,
mathieu
Created 08-17-2016 01:13 AM
Yes, you are right, there has to be a explicit grant on that URI, not just a HDFS access to the given directory.
I don't understand why the documentation do not explain it more clearly..
Thanks