diff --git a/ipaserver/install/ipa_restore.py b/ipaserver/install/ipa_restore.py index 7e67dc98096..776c5582f3e 100644 --- a/ipaserver/install/ipa_restore.py +++ b/ipaserver/install/ipa_restore.py @@ -631,6 +631,10 @@ def ldif2db(self, instance, backend, online=True): os.makedirs(template_dir) except OSError as e: pass + + os.chown(template_dir, pent.pw_uid, pent.pw_gid) + os.chmod(template_dir, 0o770) + # Restore SELinux context of template_dir tasks.restore_context(template_dir)