Browse Source

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

Dmytro Sen 10 years ago
parent
commit
20537072e1

+ 1 - 0
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)))

+ 1 - 0
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)))