Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DA922200B40 for ; Thu, 2 Jun 2016 02:27:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D912D160A4D; Thu, 2 Jun 2016 00:27:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2E4BB160A4C for ; Thu, 2 Jun 2016 02:27:00 +0200 (CEST) Received: (qmail 68130 invoked by uid 500); 2 Jun 2016 00:26:59 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 68118 invoked by uid 99); 2 Jun 2016 00:26:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jun 2016 00:26:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 275742C033A for ; Thu, 2 Jun 2016 00:26:59 +0000 (UTC) Date: Thu, 2 Jun 2016 00:26:59 +0000 (UTC) From: "Tom Zeng (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-12408) SQLStdAuthorizer expects external table creator to be owner of directory, does not respect rwx group permission. Only one user could ever create an external table definition to dir! MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 02 Jun 2016 00:27:01 -0000 [ https://issues.apache.org/jira/browse/HIVE-12408?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15311467#comment-15311467 ] Tom Zeng commented on HIVE-12408: --------------------------------- When the database/schema location is on s3, create schema/database will fail since the owner is '' and isOwnerOfFileHierarchy will always be false. Changing CREATETABLE [[INSERT, DELETE, UPDATE, OBJECT OWNERSHIP] to CREATETABLE [[INSERT, DELETE, UPDATE] works and I tested on Amazon EMR with Hive 1.2 and 2.x. If this is an okay solution I can create a patch for it. > SQLStdAuthorizer expects external table creator to be owner of directory, does not respect rwx group permission. Only one user could ever create an external table definition to dir! > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HIVE-12408 > URL: https://issues.apache.org/jira/browse/HIVE-12408 > Project: Hive > Issue Type: Bug > Components: Authorization, Security, SQLStandardAuthorization > Affects Versions: 0.14.0 > Environment: HDP 2.2 + Kerberos > Reporter: Hari Sekhon > Assignee: Thejas M Nair > Priority: Critical > > When trying to create an external table via beeline in Hive using the SQLStdAuthorizer it expects the table creator to be the owner of the directory path and ignores the group rwx permission that is granted to the user. > {code}Error: Error while compiling statement: FAILED: HiveAccessControlException Permission denied: Principal [name=hari, type=USER] does not have following privileges for operation CREATETABLE [[INSERT, DELETE, OBJECT OWNERSHIP] on Object [type=DFS_URI, name=/etl/path/to/hdfs/dir]] (state=42000,code=40000){code} > All it should be checking is read access to that directory. > The directory owner requirement breaks the ability of more than one user to create external table definitions to a given location. For example this is a flume landing directory with json data, and the /etl tree is owned by the flume user. Even chowning the tree to another user would still break access to other users who are able to read the directory in hdfs but would still unable to create external tables on top of it. > This looks like a remnant of the owner only access model in SQLStdAuth and is a separate issue to HIVE-11864 / HIVE-12324. -- This message was sent by Atlassian JIRA (v6.3.4#6332)