Browse Source

AMBARI-8080. On non-root server, client download configs fails. (aonishuk)

Andrew Onishuk 10 năm trước cách đây
mục cha
commit
b0887b3fe6

+ 2 - 0
ambari-agent/pom.xml

@@ -251,6 +251,7 @@
             </mapping>
             <mapping>
               <directory>${jinja.install.dir}</directory>
+              <filemode>755</filemode>
               <username>root</username>
               <groupname>root</groupname>
               <sources>
@@ -421,6 +422,7 @@
                 <prefix>${jinja.install.dir}</prefix>
                 <user>root</user>
                 <group>root</group>
+                <filemode>755</filemode>
               </mapper>
             </data>
             <data>

+ 9 - 0
ambari-server/pom.xml

@@ -291,6 +291,7 @@
             </mapping>
             <mapping>
               <directory>${jinja.install.dir}</directory>
+              <filemode>755</filemode>
               <username>root</username>
               <groupname>root</groupname>
               <sources>
@@ -430,6 +431,12 @@
                 </source>
               </sources>
             </mapping>
+            <mapping>
+              <directory>/var/lib/ambari-server/data/tmp</directory>
+              <filemode>755</filemode>
+              <username>root</username>
+              <groupname>root</groupname>
+            </mapping>
             <mapping>
               <directory>/var/lib/ambari-server/resources/apps</directory>
               <filemode>755</filemode>
@@ -595,6 +602,7 @@
                 <path>/var/run/ambari-server/stack-recommendations</path>
                 <path>/var/log/ambari-server</path>
                 <path>/var/lib/ambari-server/resources/upgrade</path>
+                <path>/var/lib/ambari-server/data/tmp</path>
               </paths>
             </data>
             <!-- TODO: should be included all subdirs, if exists-->
@@ -992,6 +1000,7 @@
               <mapper>
                 <type>perm</type>
                 <prefix>${jinja.install.dir}</prefix>
+                <filemode>755</filemode>
                 <user>root</user>
                 <group>root</group>
               </mapper>

+ 2 - 0
ambari-server/src/main/python/ambari-server.py

@@ -566,6 +566,8 @@ NR_ADJUST_OWNERSHIP_LIST = [
   ("/etc/ambari-server/conf/ldap-password.dat", "640", "{0}", False),
   ("/var/run/ambari-server/stack-recommendations/", "644", "{0}", True),
   ("/var/run/ambari-server/stack-recommendations/", "755", "{0}", False),
+  ("/var/lib/ambari-server/data/tmp/", "644", "{0}", True),
+  ("/var/lib/ambari-server/data/tmp/", "755", "{0}", False),
   # Also, /etc/ambari-server/conf/password.dat
   # is generated later at store_password_file
 ]