You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sw...@apache.org on 2016/12/07 07:51:58 UTC

ambari git commit: AMBARI-19119. Fix hive-site.xml and hive-env.sh permissions for /etc/hive/conf (client) folder from 600 to 644.

Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-18901 512475f6f -> ff9405fea


AMBARI-19119. Fix hive-site.xml and hive-env.sh permissions for /etc/hive/conf (client) folder from 600 to 644.


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ff9405fe
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ff9405fe
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ff9405fe

Branch: refs/heads/branch-feature-AMBARI-18901
Commit: ff9405fea7d9f914b8388d2e5ab81bf42f0ee3a5
Parents: 512475f
Author: Swapan Shridhar <ss...@hortonworks.com>
Authored: Tue Dec 6 23:41:06 2016 -0800
Committer: Swapan Shridhar <ss...@hortonworks.com>
Committed: Tue Dec 6 23:41:06 2016 -0800

----------------------------------------------------------------------
 .../common-services/HIVE/0.12.0.2.0/package/scripts/hive.py  | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ff9405fe/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
index 415261d..4469744 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
@@ -106,7 +106,9 @@ def hive(name=None):
 @OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT)
 def hive(name=None):
   import params
-
+  hive_client_conf_path = format("{stack_root}/current/{component_directory}/conf")
+  # Permissions 644 for conf dir (client) files, and 600 for conf.server
+  mode_identified = 0644 if params.hive_config_dir == hive_client_conf_path else 0600
   if name == 'hiveserver2':
     # copy tarball to HDFS feature not supported
     if not (params.stack_version_formatted_major and check_stack_feature(StackFeature.COPY_TARBALL_TO_HDFS, params.stack_version_formatted_major)):
@@ -226,7 +228,7 @@ def hive(name=None):
             configuration_attributes=params.config['configuration_attributes']['hive-site'],
             owner=params.hive_user,
             group=params.user_group,
-            mode=0600)
+            mode=mode_identified)
 
   # Generate atlas-application.properties.xml file
   if has_atlas_in_cluster():
@@ -254,7 +256,7 @@ def hive(name=None):
   File(format("{hive_config_dir}/hive-env.sh"),
        owner=params.hive_user,
        group=params.user_group,
-       mode=0600,
+       mode=mode_identified,
        content=InlineTemplate(params.hive_env_sh_template)
   )