From 6c0a21f45f8bd2c3edc626d0fae8dd7a174fd3b5 Mon Sep 17 00:00:00 2001 From: Peter Hormanns Date: Thu, 1 Sep 2011 10:02:06 +0000 Subject: [PATCH] chgrp httpd for domain admin --- .../de/hsadmin/mods/dom/DomainProcessorFactory.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java b/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java index 0ef8e45..79b8c56 100644 --- a/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java +++ b/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java @@ -194,12 +194,21 @@ public class DomainProcessorFactory implements EntityProcessorFactory { Pac pac = domUser.getPac(); boolean dynamicWeb = pac.isDynamicWeb(); String pacName = pac.getName(); - String domsDir = domUser.getHomedir() + "/doms"; + String homeDir = domUser.getHomedir(); + String domsDir = homeDir + "/doms"; String userName = domUser.getName(); String domainDir = domsDir + "/" + dom.getName(); String[] subDirs = dynamicWeb ? DW_STRUCTURE : SW_STRUCTURE; + String httpdRights = ""; + if (pacName != userName) { + httpdRights = + "chgrp httpd " + homeDir + " && " + + "chmod g+rx " + homeDir + " && "; + } Processor mkDomainDirProzessor = - new ShellProcessor( + new ShellProcessor( httpdRights + + "chgrp httpd " + homeDir + " && " + + "chmod g+rx " + homeDir + " && " + "mkdir --mode=1550 --parents " + domsDir + " && " + "chown httpd:" + pacName + " " + domsDir + " && " + "mkdir --mode=750 " + domainDir + " && " +