summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2006-12-20 13:24:41 +0000
committerroot <root@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2006-12-20 13:24:41 +0000
commitb615c858adf18eb9c0980a291c0a5954f6638cfa (patch)
tree816d7bcfb57a8a5b5720bb7483aa8fe8799ccf97
parentb4b1d445e00a51ef0b433d0c823b429b90382ae3 (diff)
Have a DirOwnerUserNumber
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@250 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
-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}"