<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question restarting ambari server creating a file ambari.properties in /tmp location in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/restarting-ambari-server-creating-a-file-ambari-properties/m-p/157526#M119927</link>
    <description>&lt;P&gt;Team,&lt;/P&gt;&lt;P&gt;I am using ambari 2.4 and hdp 2.3.4. When I restart ambari server then it is creating a duplicate copy of ambari.properties in /tmp which is not secure. So can someone please help me to find out which script is doing it and how can I disable it. &lt;/P&gt;&lt;P&gt;p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Menlo}
span.s1 {color: #4c7aff}
span.s2 {color: #ff3b1d}&lt;/P&gt;&lt;P&gt;[root@m1 conf]# ls -ltrh /tmp/&lt;/P&gt;&lt;P&gt;total 132K&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 root      root   4.0K Jan 25 05:30 JettyContext1243975442881451335&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 root      root   4.0K Jan 25 05:30 JettyContext6393915526385492672&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 root      root   4.0K Jan 25 05:30 JettyContext1984195690767815765&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 root      root   4.0K Jan 25 05:30 JettyContext8641365562607738757&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 root      root   4.0K Jan 25 05:30 JettyContext1515414610693529637&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 root      root   4.0K Jan 25 05:30 JettyContext7330878179580795461&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 root      root   4.0K Jan 25 05:30 JettyContext1541464222736920443&lt;/P&gt;&lt;P&gt;-rw-r--r-- 1 root      root   3.1K Jan 25 05:35 ehcache-sizeof-agent2983391407808801967.jar&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 root      root   4.0K Jan 25 07:57 sqoop-root&lt;/P&gt;&lt;P&gt;drwxr-xr-x 2 hdfs      root   4.0K Jan 31 04:50 hadoop-hdfs&lt;/P&gt;&lt;P&gt;drwxr-xr-x 2 zookeeper hadoop 4.0K Jan 31 04:50 hsperfdata_zookeeper&lt;/P&gt;&lt;P&gt;drwxr-xr-x 2 kafka     hadoop 4.0K Jan 31 04:51 hsperfdata_kafka&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 hdfs      hadoop 4.0K Jan 31 10:55 Jetty_0_0_0_0_8480_journal____.8g4awa&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 hdfs      hadoop 4.0K Jan 31 10:56 Jetty_m1_hdp22_50070_hdfs____3u7krk&lt;/P&gt;&lt;P&gt;drwxr-xr-x 2 hdfs      hadoop 4.0K Jan 31 10:58 hsperfdata_hdfs&lt;/P&gt;&lt;P&gt;drwxr-xr-x 2 solr      solr   4.0K Jan 31 13:14 hsperfdata_solr&lt;/P&gt;&lt;P&gt;drwxr-xr-x 2 yarn      hadoop 4.0K Jan 31 20:21 hsperfdata_yarn&lt;/P&gt;&lt;P&gt;drwxr-xr-x 4 yarn      hadoop 4.0K Jan 31 20:21 Jetty_0_0_0_0_8088_cluster____u0rgz3&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 root      root   4.0K Jan 31 20:38 JettyContext333136355251859560&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 root      root   4.0K Jan 31 20:38 JettyContext4954089569274302233&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 root      root   4.0K Jan 31 20:38 JettyContext744074219330931424&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 root      root   4.0K Jan 31 20:38 JettyContext7325769951007858045&lt;/P&gt;&lt;P&gt;-rw------- 1 root      root    125 Jan 31 20:39 masterkey&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;-rw-r--r-- 1 root      root   7.7K Jan 31 20:49 ambari.properties.1&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Feb 2017 15:44:26 GMT</pubDate>
    <dc:creator>SK1</dc:creator>
    <dc:date>2017-02-02T15:44:26Z</dc:date>
    <item>
      <title>restarting ambari server creating a file ambari.properties in /tmp location</title>
      <link>https://community.cloudera.com/t5/Support-Questions/restarting-ambari-server-creating-a-file-ambari-properties/m-p/157526#M119927</link>
      <description>&lt;P&gt;Team,&lt;/P&gt;&lt;P&gt;I am using ambari 2.4 and hdp 2.3.4. When I restart ambari server then it is creating a duplicate copy of ambari.properties in /tmp which is not secure. So can someone please help me to find out which script is doing it and how can I disable it. &lt;/P&gt;&lt;P&gt;p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Menlo}
span.s1 {color: #4c7aff}
span.s2 {color: #ff3b1d}&lt;/P&gt;&lt;P&gt;[root@m1 conf]# ls -ltrh /tmp/&lt;/P&gt;&lt;P&gt;total 132K&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 root      root   4.0K Jan 25 05:30 JettyContext1243975442881451335&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 root      root   4.0K Jan 25 05:30 JettyContext6393915526385492672&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 root      root   4.0K Jan 25 05:30 JettyContext1984195690767815765&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 root      root   4.0K Jan 25 05:30 JettyContext8641365562607738757&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 root      root   4.0K Jan 25 05:30 JettyContext1515414610693529637&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 root      root   4.0K Jan 25 05:30 JettyContext7330878179580795461&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 root      root   4.0K Jan 25 05:30 JettyContext1541464222736920443&lt;/P&gt;&lt;P&gt;-rw-r--r-- 1 root      root   3.1K Jan 25 05:35 ehcache-sizeof-agent2983391407808801967.jar&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 root      root   4.0K Jan 25 07:57 sqoop-root&lt;/P&gt;&lt;P&gt;drwxr-xr-x 2 hdfs      root   4.0K Jan 31 04:50 hadoop-hdfs&lt;/P&gt;&lt;P&gt;drwxr-xr-x 2 zookeeper hadoop 4.0K Jan 31 04:50 hsperfdata_zookeeper&lt;/P&gt;&lt;P&gt;drwxr-xr-x 2 kafka     hadoop 4.0K Jan 31 04:51 hsperfdata_kafka&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 hdfs      hadoop 4.0K Jan 31 10:55 Jetty_0_0_0_0_8480_journal____.8g4awa&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 hdfs      hadoop 4.0K Jan 31 10:56 Jetty_m1_hdp22_50070_hdfs____3u7krk&lt;/P&gt;&lt;P&gt;drwxr-xr-x 2 hdfs      hadoop 4.0K Jan 31 10:58 hsperfdata_hdfs&lt;/P&gt;&lt;P&gt;drwxr-xr-x 2 solr      solr   4.0K Jan 31 13:14 hsperfdata_solr&lt;/P&gt;&lt;P&gt;drwxr-xr-x 2 yarn      hadoop 4.0K Jan 31 20:21 hsperfdata_yarn&lt;/P&gt;&lt;P&gt;drwxr-xr-x 4 yarn      hadoop 4.0K Jan 31 20:21 Jetty_0_0_0_0_8088_cluster____u0rgz3&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 root      root   4.0K Jan 31 20:38 JettyContext333136355251859560&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 root      root   4.0K Jan 31 20:38 JettyContext4954089569274302233&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 root      root   4.0K Jan 31 20:38 JettyContext744074219330931424&lt;/P&gt;&lt;P&gt;drwxr-xr-x 3 root      root   4.0K Jan 31 20:38 JettyContext7325769951007858045&lt;/P&gt;&lt;P&gt;-rw------- 1 root      root    125 Jan 31 20:39 masterkey&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;-rw-r--r-- 1 root      root   7.7K Jan 31 20:49 ambari.properties.1&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 15:44:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/restarting-ambari-server-creating-a-file-ambari-properties/m-p/157526#M119927</guid>
      <dc:creator>SK1</dc:creator>
      <dc:date>2017-02-02T15:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: restarting ambari server creating a file ambari.properties in /tmp location</title>
      <link>https://community.cloudera.com/t5/Support-Questions/restarting-ambari-server-creating-a-file-ambari-properties/m-p/157527#M119928</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2273/saurabhmcakiet.html" nodeid="2273"&gt;@Saurabh&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I can see that ambari.properties.1 file is having permission only for root user and other users can only read that. That should not effect anything. &lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 15:52:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/restarting-ambari-server-creating-a-file-ambari-properties/m-p/157527#M119928</guid>
      <dc:creator>chennuri_gouris</dc:creator>
      <dc:date>2017-02-02T15:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: restarting ambari server creating a file ambari.properties in /tmp location</title>
      <link>https://community.cloudera.com/t5/Support-Questions/restarting-ambari-server-creating-a-file-ambari-properties/m-p/157528#M119929</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2403/chennurigourishankar.html" nodeid="2403"&gt;@chennuri gouri shankar&lt;/A&gt;:  This file has sensitive data if you have synced your ambari server with ldap. So we can not let it create. And changing permission is not a solution as next time when I will restart I will change permission. &lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 17:06:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/restarting-ambari-server-creating-a-file-ambari-properties/m-p/157528#M119929</guid>
      <dc:creator>SK1</dc:creator>
      <dc:date>2017-02-02T17:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: restarting ambari server creating a file ambari.properties in /tmp location</title>
      <link>https://community.cloudera.com/t5/Support-Questions/restarting-ambari-server-creating-a-file-ambari-properties/m-p/157529#M119930</link>
      <description>&lt;P&gt;amabri.properties file does not store any passwords. Is any other data classified as sensitive on your end?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 06:44:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/restarting-ambari-server-creating-a-file-ambari-properties/m-p/157529#M119930</guid>
      <dc:creator>sidwagle</dc:creator>
      <dc:date>2017-02-03T06:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: restarting ambari server creating a file ambari.properties in /tmp location</title>
      <link>https://community.cloudera.com/t5/Support-Questions/restarting-ambari-server-creating-a-file-ambari-properties/m-p/157530#M119931</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/399/swagle.html" nodeid="399"&gt;@swagle&lt;/A&gt;We have integrated ambari with ldap and this ambari.properties contains all required ldap details. &lt;/P&gt;&lt;P&gt;Sorry but my question is not like we have sensitive data or not, my question is why it is creating backup copy of this file and how we can prevent it. &lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 21:39:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/restarting-ambari-server-creating-a-file-ambari-properties/m-p/157530#M119931</guid>
      <dc:creator>SK1</dc:creator>
      <dc:date>2017-02-03T21:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: restarting ambari server creating a file ambari.properties in /tmp location</title>
      <link>https://community.cloudera.com/t5/Support-Questions/restarting-ambari-server-creating-a-file-ambari-properties/m-p/157531#M119932</link>
      <description>&lt;P&gt;The backup function is called from a couple of places and it is not a recent addition based on git history.&lt;/P&gt;&lt;P&gt;You can manually disable it by commenting out the copy call in the python code at:&lt;/P&gt;&lt;P&gt;/usr/lib/python2.6/site-packages/ambari_server/serverConfiguration.py&lt;/P&gt;&lt;P&gt;def backup_file_in_temp(filePath):&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2017 03:01:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/restarting-ambari-server-creating-a-file-ambari-properties/m-p/157531#M119932</guid>
      <dc:creator>sidwagle</dc:creator>
      <dc:date>2017-02-04T03:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: restarting ambari server creating a file ambari.properties in /tmp location</title>
      <link>https://community.cloudera.com/t5/Support-Questions/restarting-ambari-server-creating-a-file-ambari-properties/m-p/157532#M119933</link>
      <description>&lt;P&gt;Thanks a lot &lt;A rel="user" href="https://community.cloudera.com/users/399/swagle.html" nodeid="399"&gt;@swagle&lt;/A&gt;. I have commented this backup call function and now it is not creating backup copy. Thanks once again. &lt;/P&gt;&lt;P&gt;# update properties in a section-less properties file&lt;/P&gt;&lt;P&gt;# Cannot use ConfigParser due to bugs in version 2.6&lt;/P&gt;&lt;P&gt;def update_properties(propertyMap):&lt;/P&gt;&lt;P&gt;  conf_file = search_file(AMBARI_PROPERTIES_FILE, get_conf_dir())&lt;/P&gt;&lt;P&gt;  #backup_file_in_temp(conf_file)&lt;/P&gt;&lt;P&gt;  if propertyMap is not None and conf_file is not None:&lt;/P&gt;&lt;P&gt;    properties = Properties()&lt;/P&gt;&lt;P&gt;    try:&lt;/P&gt;&lt;P&gt;      with open(conf_file, 'r') as file:&lt;/P&gt;&lt;P&gt;        properties.load(file)&lt;/P&gt;&lt;P&gt;    except (Exception), e:&lt;/P&gt;&lt;P&gt;      print_error_msg('Could not read "%s": %s' % (conf_file, e))&lt;/P&gt;&lt;P&gt;      return -1&lt;/P&gt;&lt;P&gt;    for key in propertyMap.keys():&lt;/P&gt;&lt;P&gt;      properties.removeOldProp(key)&lt;/P&gt;&lt;P&gt;      properties.process_pair(key, str(propertyMap[key]))&lt;/P&gt;&lt;P&gt;    for key in properties.keys():&lt;/P&gt;&lt;P&gt;      if not propertyMap.has_key(key):&lt;/P&gt;&lt;P&gt;        properties.removeOldProp(key)&lt;/P&gt;&lt;P&gt;    with open(conf_file, 'w') as file:&lt;/P&gt;&lt;P&gt;      properties.store_ordered(file)&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2017 12:00:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/restarting-ambari-server-creating-a-file-ambari-properties/m-p/157532#M119933</guid>
      <dc:creator>SK1</dc:creator>
      <dc:date>2017-02-04T12:00:38Z</dc:date>
    </item>
  </channel>
</rss>

