--- action_reposync.py_icomfort-cobbler-branch_fetch-repomd-safely 2010-04-12 19:00:01.000000000 +0200 +++ action_reposync.py 2010-04-26 18:05:02.000000000 +0200 @@ -563,14 +563,14 @@ a safeguard. """ # all_path = os.path.join(repo_path, "*") - cmd1 = "chown -R root:apache %s" % repo_path + cmd1 = "find %s -not -user root -or -not -group apache -print0 | xargs -0 chown root:apache" % repo_path utils.subprocess_call(self.logger, cmd1) - cmd2 = "chmod -R 755 %s" % repo_path + cmd2 = "find %s '(' -type d -and -not -perm -755 ')' -or '(' -type f -and -not -perm -444 ')' -print0 | xargs -0 chmod a+rX" % repo_path utils.subprocess_call(self.logger, cmd2) if self.config.api.is_selinux_enabled(): - cmd3 = "chcon --reference /var/www %s >/dev/null 2>/dev/null" % repo_path + cmd3 = "/sbin/restorecon -R %s >/dev/null 2>/dev/null" % repo_path utils.subprocess_call(self.logger, cmd3)