Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ED17911E19 for ; Sat, 24 May 2014 01:58:02 +0000 (UTC) Received: (qmail 51023 invoked by uid 500); 24 May 2014 01:58:01 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 50949 invoked by uid 500); 24 May 2014 01:58:01 -0000 Mailing-List: contact dev-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 dev@hive.apache.org Received: (qmail 50940 invoked by uid 500); 24 May 2014 01:58:01 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 50937 invoked by uid 99); 24 May 2014 01:58:01 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 May 2014 01:58:01 +0000 Date: Sat, 24 May 2014 01:58:01 +0000 (UTC) From: "Szehon Ho (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-6892) Permission inheritance issues MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-6892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Szehon Ho updated HIVE-6892: ---------------------------- Description: *HDFS Background* * When a file or directory is created, its owner is the user identity of the client process, and its group is inherited from parent (the BSD rule). Permissions are taken from default umask. Extended Acl's are inherited from parent (? TBD) *Goals* Users may want the following Hive warehouse file/dir to inherit security properties from their directory parents: * Directories created by new table/partition/bucket * Files added to tables via load/insert * Table directories exported/imported (open question of whether exported table inheriting perm from new parent needs another flag) What may be inherited: * Basic file permission * Groups (already done in some cases by HDFS for new table/partition/bucket directories) * Extended ACL's (TBD) *Behavior* * When "hive.warehouse.subdir.inherit.perms" flag is enabled in Hive, Hive will try to do all above inheritances. In the future, we can add more flags for more finer-grained control. * Failure by Hive to inherit will not cause operation to fail. Rule of thumb of when security-prop inheritance will happen is the following: ** To run chmod, a user must be the owner of the file, or else a super-user. ** To run chgrp, a user must be the owner of files, or else a super-user. ** Hence, user that hive runs as (either 'hive' or the logged-in user in case of impersonation), must be super-user or owner of the file whose security properties are going to be changed. was: *HDFS Background* * When a file or directory is created, its owner is the user identity of the client process, and its group is inherited from parent (the BSD rule). Permissions are taken from default umask. Extended Acl's are inherited from parent (? TBD) *Goals* Following are file/dir of Hive that user might want to inherit security properties from parent: * Directories created by new table/partition/bucket should inherit from parent (groups already inherited by HDFS, extended ACL's TBD) * Files added to tables via load/insert should inherit from parent * Tables both exported/imported should inherit from parent (open question of whether exported table inheriting perm needs another flag) Following are the security properties that user might want to inherit for the above cases * Basic permission * Groups (already done in some cases by HDFS for new table/partition/bucket directories) * Extended ACL's (TBD) *Behavior* * When "hive.warehouse.subdir.inherit.perms" flag is enabled in Hive, Hive will try to do all above inheritances. In the future, we can add more flags for more finer-grained control. * Failure by Hive to inherit will not cause operation to fail. Rule of thumb of when security-prop inheritance will fail is the following: ** To run chmod, a user must be the owner of the file, or else a super-user. ** To run chgrp, a user must be the owner of files, or else a super-user. ** Hence, user that hive runs as (either 'hive' or the logged-in user in case of impersonation), must be super-user or owner of the file whose security properties are going to be changed. > Permission inheritance issues > ----------------------------- > > Key: HIVE-6892 > URL: https://issues.apache.org/jira/browse/HIVE-6892 > Project: Hive > Issue Type: Bug > Components: Security > Affects Versions: 0.13.0 > Reporter: Szehon Ho > Assignee: Szehon Ho > > *HDFS Background* > * When a file or directory is created, its owner is the user identity of the client process, and its group is inherited from parent (the BSD rule). Permissions are taken from default umask. Extended Acl's are inherited from parent (? TBD) > *Goals* > Users may want the following Hive warehouse file/dir to inherit security properties from their directory parents: > * Directories created by new table/partition/bucket > * Files added to tables via load/insert > * Table directories exported/imported (open question of whether exported table inheriting perm from new parent needs another flag) > What may be inherited: > * Basic file permission > * Groups (already done in some cases by HDFS for new table/partition/bucket directories) > * Extended ACL's (TBD) > *Behavior* > * When "hive.warehouse.subdir.inherit.perms" flag is enabled in Hive, Hive will try to do all above inheritances. In the future, we can add more flags for more finer-grained control. > * Failure by Hive to inherit will not cause operation to fail. Rule of thumb of when security-prop inheritance will happen is the following: > ** To run chmod, a user must be the owner of the file, or else a super-user. > ** To run chgrp, a user must be the owner of files, or else a super-user. > ** Hence, user that hive runs as (either 'hive' or the logged-in user in case of impersonation), must be super-user or owner of the file whose security properties are going to be changed. -- This message was sent by Atlassian JIRA (v6.2#6252)