From bf0f01c02fb0340e59ad436a7a9d1391f7040ad3 Mon Sep 17 00:00:00 2001 From: emrekgn Date: Fri, 29 Jul 2016 19:06:23 +0300 Subject: [PATCH 1/3] change permission recursively --- opt/ahenk/base/util/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opt/ahenk/base/util/util.py b/opt/ahenk/base/util/util.py index 1343122..cdb5d60 100644 --- a/opt/ahenk/base/util/util.py +++ b/opt/ahenk/base/util/util.py @@ -263,7 +263,7 @@ class Util: @staticmethod def set_permission(path, permission_code): - Util.execute('chmod {} {}'.format(permission_code, path)) + Util.execute('chmod -R {0} {1}'.format(permission_code, path)) @staticmethod def has_attr_json(arg, attr_name): From 3a4bfbcc7c248f2ac0405df94dbc7f21d4f9520b Mon Sep 17 00:00:00 2001 From: emrekgn Date: Fri, 29 Jul 2016 19:07:17 +0300 Subject: [PATCH 2/3] create received_dir_path with correct permissions --- opt/ahenk/base/system/system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opt/ahenk/base/system/system.py b/opt/ahenk/base/system/system.py index 405d671..871df41 100644 --- a/opt/ahenk/base/system/system.py +++ b/opt/ahenk/base/system/system.py @@ -126,8 +126,8 @@ class System: def received_dir_path(): path = '/tmp/.ahenk/' if Util.is_exist(path) is False: - # TODO write permission add Util.create_directory(path) + Util.set_permission(path, '777') return path class Process(object): From 3fc86867ee39fec9253ded66f4b5bb86508ecf75 Mon Sep 17 00:00:00 2001 From: emrekgn Date: Fri, 29 Jul 2016 19:09:22 +0300 Subject: [PATCH 3/3] do not use lowercase DN - this causes dict problems --- opt/ahenk/base/registration/Registration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opt/ahenk/base/registration/Registration.py b/opt/ahenk/base/registration/Registration.py index 062c21b..223029d 100644 --- a/opt/ahenk/base/registration/Registration.py +++ b/opt/ahenk/base/registration/Registration.py @@ -46,7 +46,7 @@ class Registration: j = json.loads(reg_reply) self.logger.debug('[Registration]' + j['message']) status = str(j['status']).lower() - dn = str(j['agentDn']).lower() + dn = str(j['agentDn']) self.logger.debug('[Registration] Registration status: ' + str(status))