chgrp httpd for domain admin

This commit is contained in:
Peter Hormanns 2011-09-01 10:02:06 +00:00
parent 75b244caea
commit 6c0a21f45f

View File

@ -194,12 +194,21 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
Pac pac = domUser.getPac(); Pac pac = domUser.getPac();
boolean dynamicWeb = pac.isDynamicWeb(); boolean dynamicWeb = pac.isDynamicWeb();
String pacName = pac.getName(); String pacName = pac.getName();
String domsDir = domUser.getHomedir() + "/doms"; String homeDir = domUser.getHomedir();
String domsDir = homeDir + "/doms";
String userName = domUser.getName(); String userName = domUser.getName();
String domainDir = domsDir + "/" + dom.getName(); String domainDir = domsDir + "/" + dom.getName();
String[] subDirs = dynamicWeb ? DW_STRUCTURE : SW_STRUCTURE; String[] subDirs = dynamicWeb ? DW_STRUCTURE : SW_STRUCTURE;
String httpdRights = "";
if (pacName != userName) {
httpdRights =
"chgrp httpd " + homeDir + " && " +
"chmod g+rx " + homeDir + " && ";
}
Processor mkDomainDirProzessor = Processor mkDomainDirProzessor =
new ShellProcessor( new ShellProcessor( httpdRights +
"chgrp httpd " + homeDir + " && " +
"chmod g+rx " + homeDir + " && " +
"mkdir --mode=1550 --parents " + domsDir + " && " + "mkdir --mode=1550 --parents " + domsDir + " && " +
"chown httpd:" + pacName + " " + domsDir + " && " + "chown httpd:" + pacName + " " + domsDir + " && " +
"mkdir --mode=750 " + domainDir + " && " + "mkdir --mode=750 " + domainDir + " && " +