The server installation failed on F17 due to permission problem.
The /var/lib/dirsrv/boot.ldif was previously owned and only readable
by root. It is now owned by DS user dirsrv.

Ticket #2544

--
Endi S. Dewata
From 0a9b9c026938a2879cd3d9ed54a14b1afc96f1f0 Mon Sep 17 00:00:00 2001
From: Endi Sukma Dewata <edew...@redhat.com>
Date: Fri, 16 Mar 2012 17:15:26 -0500
Subject: [PATCH] Fixed boot.ldif permission.

The server installation failed on F17 due to permission problem.
The /var/lib/dirsrv/boot.ldif was previously owned and only readable
by root. It is now owned by DS user dirsrv.

Ticket #2544
---
 ipaserver/install/dsinstance.py |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/ipaserver/install/dsinstance.py b/ipaserver/install/dsinstance.py
index e549e13ccad711da8fbde359f9263f5828c6d5a0..d82454d04c9482f07879ff1b9296754be3c2a833 100644
--- a/ipaserver/install/dsinstance.py
+++ b/ipaserver/install/dsinstance.py
@@ -305,6 +305,8 @@ class DsInstance(service.Service):
                 root_logger.critical("failed to add user %s" % e)
 
     def __create_instance(self):
+        pent = pwd.getpwnam(DS_USER)
+
         self.backup_state("running", is_ds_running())
         self.backup_state("serverid", self.serverid)
         self.fstore.backup_file("/etc/sysconfig/dirsrv")
@@ -320,6 +322,7 @@ class DsInstance(service.Service):
 
         # Must be readable for dirsrv
         os.chmod(target_fname, 0440)
+        os.chown(target_fname, pent.pw_uid, pent.pw_gid)
 
         inf_txt = ipautil.template_str(INF_TEMPLATE, self.sub_dict)
         root_logger.debug("writing inf template")
-- 
1.7.9.3

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to