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 2013/06/27 06:21:12 UTC

svn commit: r1497207 - /incubator/ambari/branches/branch-1.2.5/ambari-server/src/main/python/ambari-server.py

Author: swagle
Date: Thu Jun 27 04:21:12 2013
New Revision: 1497207

URL: http://svn.apache.org/r1497207
Log:
AMBARI-2502. Permissions issue on server start up causes server to fail immediately on startup. (swagle)

Modified:
    incubator/ambari/branches/branch-1.2.5/ambari-server/src/main/python/ambari-server.py

Modified: incubator/ambari/branches/branch-1.2.5/ambari-server/src/main/python/ambari-server.py
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2.5/ambari-server/src/main/python/ambari-server.py?rev=1497207&r1=1497206&r2=1497207&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2.5/ambari-server/src/main/python/ambari-server.py (original)
+++ incubator/ambari/branches/branch-1.2.5/ambari-server/src/main/python/ambari-server.py Thu Jun 27 04:21:12 2013
@@ -389,7 +389,6 @@ NR_ADJUST_OWNERSHIP_LIST =[
   ( "/etc/ambari-server/conf", "644", "{0}", "{0}", True ),
   ( "/etc/ambari-server/conf", "755", "{0}", "{0}", False ),
   ( "/etc/ambari-server/conf/password.dat", "640", "{0}", "{0}", False ),
-
   # Also, /etc/ambari-server/conf/password.dat
   # is generated later at store_password_file
 ]
@@ -568,6 +567,11 @@ def adjust_directory_permissions(ambari_
   cmd = RECURSIVE_RM_CMD.format(bootstrap_dir)
   run_os_command(cmd)
   os.mkdir(bootstrap_dir)
+  # Add master key if exists
+  keyLocation = get_master_key_location(properties)
+  masterKeyFile = search_file(SECURITY_MASTER_KEY_FILENAME, keyLocation)
+  if masterKeyFile:
+    NR_ADJUST_OWNERSHIP_LIST.append((masterKeyFile, "600", "{0}", "{0}", False))
   print "Adjusting file permissions and ownership..."
   for pack in NR_ADJUST_OWNERSHIP_LIST:
     file = pack[0]