File users_patch.diff of Package cobbler
Index: cobbler/action_reposync.py
===================================================================
--- cobbler/action_reposync.py.orig
+++ cobbler/action_reposync.py
@@ -560,7 +560,12 @@ class RepoSync:
a safeguard.
"""
# all_path = os.path.join(repo_path, "*")
- cmd1 = "chown -R root:apache %s" % repo_path
+ owner = "root:apache"
+ if os.path.exists("/etc/SuSE-release"):
+ owner = "root:wwwrun"
+
+ cmd1 = "chown -R "+owner+" %s" % repo_path
+
utils.subprocess_call(self.logger, cmd1)
cmd2 = "chmod -R 755 %s" % repo_path
Index: cobbler/cobblerd.py
===================================================================
--- cobbler/cobblerd.py.orig
+++ cobbler/cobblerd.py
@@ -67,6 +67,8 @@ def regen_ss_file():
http_user = "apache"
if utils.check_dist() in [ "debian", "ubuntu" ]:
http_user = "www-data"
+ elif utils.check_dist() == "suse":
+ http_user = "wwwrun"
utils.os_system("chown %s /var/lib/cobbler/web.ss"%http_user )
else:
fd = open(ssfile,"w+")