File users_patch.diff of Package cobbler

--- cobbler/action_reposync.py
+++ cobbler/action_reposync.py	2011/04/04 09:26:39
@@ -560,7 +560,12 @@
         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
--- cobbler/cobblerd.py
+++ cobbler/cobblerd.py	2011/04/04 09:28:26
@@ -67,6 +67,8 @@
         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+")
openSUSE Build Service is sponsored by