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

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsAdd voteVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned Assign to me
            zhangda zhangda

            Dates

              Created:
              Updated:

              Slack

                Issue deployment