Skip to content

Commit

Permalink
ipa-restore: Restore ownership and perms on 389-ds log directory
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rcritten committed Sep 23, 2019
1 parent 71c09ad commit 966e0b8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ipaserver/install/ipa_restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 966e0b8

Please sign in to comment.