Fix permission problem with DS user.

This commit is contained in:
Karl MacMillan 0001-01-01 00:00:00 +00:00
parent 326b37371b
commit 0d0f83f603

View File

@ -24,6 +24,7 @@ import tempfile
import shutil import shutil
import logging import logging
import pwd import pwd
import os
SHARE_DIR = "/usr/share/ipa/" SHARE_DIR = "/usr/share/ipa/"
@ -102,6 +103,7 @@ class DsInstance:
self.__setup_sub_dict() self.__setup_sub_dict()
self.__create_ds_user() self.__create_ds_user()
self.__set_ds_perms()
self.__create_instance() self.__create_instance()
self.__add_default_schemas() self.__add_default_schemas()
self.__enable_ssl() self.__enable_ssl()
@ -141,6 +143,12 @@ class DsInstance:
run(args) run(args)
logging.debug("done adding user") logging.debug("done adding user")
def __set_ds_perms(self):
p = pwd.getpwnam(self.ds_user)
uid = p.pw_uid
gid = p.pg_gid
os.chown("/var/tmp/fedora-ds", uid, gid)
def __create_instance(self): def __create_instance(self):
logging.debug("creating ds instance . . . ") logging.debug("creating ds instance . . . ")
inf_txt = template_str(INF_TEMPLATE, self.sub_dict) inf_txt = template_str(INF_TEMPLATE, self.sub_dict)