ipa-restore: Restore ownership and perms on 389-ds log directory

Previously it would end up being owned by root:root mode 0755
instead of dirsrv:dirsrv mode 0770.

https://pagure.io/freeipa/issue/7725

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
This commit is contained in:
Rob Crittenden committed 2019-09-23 09:27:28 -04:00
1 parent 802e54dd0e
commit 8da0e2e977
1 file changed
+4
+4
View File
@@ -631,6 +631,10 @@ class Restore(admintool.AdminTool):
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)