Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-26449

alter database set location 'xxx' command should not check for user's admin privilege on hdfs path

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.1.2
    • None
    • Authorization
    • None

    Description

      alter database set location 'hdfs://xxxx' command fails with the following error:

      FAILED: HiveAccessControlException Permission denied: Principal [name=admin, type=USER] does not have following privileges for operation ALTERDATABASE_LOCATION [[ADMIN PRIVILEGE] on Object [type=DFS_URI, name=hdfs://xxxx]]

      It checks if the user has the admin privilege on the location path.  However only OWNER_PRIV, INSERT_NOGRANT, DELETE_NOGRANT or SELECT_NOGRANT can be returned  from getPrivilegesFromFS() function call. i.e. There's no mapping from admin privilege to the hdfs access privilege. So I suggest using INS_SEL_DEL_NOGRANT_AR instead of admin privilege checking. Patch is attached for review, thanks.

      Attachments

        Activity

          People

            Unassigned Unassigned
            zhangda zhangda
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: