From b615c858adf18eb9c0980a291c0a5954f6638cfa Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Wed, 20 Dec 2006 13:24:41 +0000 Subject: Have a DirOwnerUserNumber git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@250 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede --- bin/ldap2apache | 9 +++++---- 1 file 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}" -- cgit v1.2.3