You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ds...@apache.org on 2015/03/20 21:11:36 UTC

ambari git commit: AMBARI-10165 Permission denied on .hash file when starting ambari server as non root user on ubuntu (dsen)

Repository: ambari
Updated Branches:
  refs/heads/trunk 2bb070b6d -> 20537072e


AMBARI-10165 Permission denied on .hash file when starting ambari server as non root user on ubuntu (dsen)


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

Branch: refs/heads/trunk
Commit: 20537072e19992c38266ed5cce647ae73f39a86d
Parents: 2bb070b
Author: Dmytro Sen <ds...@apache.org>
Authored: Fri Mar 20 22:07:53 2015 +0200
Committer: Dmytro Sen <ds...@apache.org>
Committed: Fri Mar 20 22:08:55 2015 +0200

----------------------------------------------------------------------
 ambari-agent/src/main/python/ambari_agent/FileCache.py             | 1 +
 ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py | 1 +
 2 files changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/20537072/ambari-agent/src/main/python/ambari_agent/FileCache.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/ambari_agent/FileCache.py b/ambari-agent/src/main/python/ambari_agent/FileCache.py
index 3946b46..be5c23c 100644
--- a/ambari-agent/src/main/python/ambari_agent/FileCache.py
+++ b/ambari-agent/src/main/python/ambari_agent/FileCache.py
@@ -206,6 +206,7 @@ class FileCache():
     try:
       with open(hash_file, "w") as fh:
         fh.write(new_hash)
+      os.chmod(hash_file, 0o666)
     except Exception, err:
       raise CachingException("Can not write to file {0} : {1}".format(hash_file,
                                                                  str(err)))

http://git-wip-us.apache.org/repos/asf/ambari/blob/20537072/ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py b/ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py
index 5d01e3e..fe80723 100644
--- a/ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py
+++ b/ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py
@@ -211,6 +211,7 @@ class ResourceFilesKeeper():
     try:
       with open(hash_file, "w") as fh:
         fh.write(new_hash)
+      os.chmod(hash_file, 0o666)
     except Exception, err:
       raise KeeperException("Can not write to file {0} : {1}".format(hash_file,
                                                                    str(err)))