File users_patch.diff of Package cobbler
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-cobbler-cobbler-2.4.0-1/cobbler/action_reposync.py ./cobbler/action_reposync.py
--- ../orig-cobbler-cobbler-2.4.0-1/cobbler/action_reposync.py 2013-06-20 07:42:48.000000000 +0200
+++ ./cobbler/action_reposync.py 2013-08-13 13:46:50.341464250 +0200
@@ -585,7 +585,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
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-cobbler-cobbler-2.4.0-1/cobbler/cobblerd.py ./cobbler/cobblerd.py
--- ../orig-cobbler-cobbler-2.4.0-1/cobbler/cobblerd.py 2013-06-20 07:42:48.000000000 +0200
+++ ./cobbler/cobblerd.py 2013-08-13 13:46:50.345464415 +0200
@@ -64,6 +64,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 = os.open(ssfile,os.O_CREAT|os.O_RDWR,0600)