summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/ldap2apache9
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/ldap2apache b/bin/ldap2apache
index 2722129..fa9cfc3 100755
--- a/bin/ldap2apache
+++ b/bin/ldap2apache
@@ -78,15 +78,16 @@ clients.each{ |c|
cgidiraddto = vhost['tnWebVHostCgiDirAddto'][0].gsub("\n", "\n\t") if vhost['tnWebVHostCgiDirAddto']
ssl = true if property['https'] == "only"
+ vhostuid = property['DirOwnerUserNumber'] ? property['DirOwnerUserNumber'].to_i : uid
vhostgid = property['DirOwnerGroupNumber'] ? property['DirOwnerGroupNumber'].to_i : gid
umask=File.umask
File.umask(0000)
- mkdir(home, 02755, uid, vhostgid)
- mkdir(home+"/htdocs", 02755, uid, vhostgid)
+ mkdir(home, 02755, vhostuid, vhostgid)
+ mkdir(home+"/htdocs", 02755, vhostuid, vhostgid)
mkdir(home+"/bin", 02755, 0, vhostgid)
- mkdir(home+"/cgi-bin", 02755, uid, vhostgid) if property['cgi-bin'] == "yes"
- mkdir(home+"/tmp", 03775, uid, @www_gid)
+ mkdir(home+"/cgi-bin", 02755, vhostuid, vhostgid) if property['cgi-bin'] == "yes"
+ mkdir(home+"/tmp", 03775, vhostuid, @www_gid)
File.umask(umask)
basedir = "#{home}"