Return-Path: X-Original-To: apmail-incubator-ambari-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-ambari-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0477D108FD for ; Thu, 27 Jun 2013 04:21:48 +0000 (UTC) Received: (qmail 76731 invoked by uid 500); 27 Jun 2013 04:21:47 -0000 Delivered-To: apmail-incubator-ambari-commits-archive@incubator.apache.org Received: (qmail 76705 invoked by uid 500); 27 Jun 2013 04:21:47 -0000 Mailing-List: contact ambari-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@incubator.apache.org Delivered-To: mailing list ambari-commits@incubator.apache.org Received: (qmail 76698 invoked by uid 99); 27 Jun 2013 04:21:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Jun 2013 04:21:47 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Jun 2013 04:21:45 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 65B7C2388AB9; Thu, 27 Jun 2013 04:21:25 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1497208 - /incubator/ambari/trunk/ambari-server/src/main/python/ambari-server.py Date: Thu, 27 Jun 2013 04:21:25 -0000 To: ambari-commits@incubator.apache.org From: swagle@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130627042125.65B7C2388AB9@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: swagle Date: Thu Jun 27 04:21:24 2013 New Revision: 1497208 URL: http://svn.apache.org/r1497208 Log: AMBARI-2502. Permissions issue on server start up causes server to fail immediately on startup. (swagle) Modified: incubator/ambari/trunk/ambari-server/src/main/python/ambari-server.py Modified: incubator/ambari/trunk/ambari-server/src/main/python/ambari-server.py URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/python/ambari-server.py?rev=1497208&r1=1497207&r2=1497208&view=diff ============================================================================== --- incubator/ambari/trunk/ambari-server/src/main/python/ambari-server.py (original) +++ incubator/ambari/trunk/ambari-server/src/main/python/ambari-server.py Thu Jun 27 04:21:24 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]