From 03eefaa983a7f16902365850a8fbb0514d7e8c2c Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Fri, 3 Nov 2006 22:08:17 +0000 Subject: Allow giving another gid for directory ownership git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@241 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede --- bin/ldap2apache | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/ldap2apache b/bin/ldap2apache index 36de91a..9d7be09 100755 --- a/bin/ldap2apache +++ b/bin/ldap2apache @@ -47,7 +47,7 @@ clients.each{ |c| mkdir(client_home , 02755, 0, 0) mkdir(client_home+"/logs" , 02750, 0, gid) mkdir(client_home+"/logs-archive" , 02750, 0, gid) - mkdir(client_home+"/logs-for-stat", 02750, 0, gid) + #mkdir(client_home+"/logs-for-stat", 02750, 0, gid) mkdir(client_home+"/pg" , 02750, @postgres_uid, gid) c['vhosts'].each{ |vhost| bind = vhost['tnWebVHostBind'] ? vhost['tnWebVHostBind'][0] : @defaultbind @@ -78,13 +78,14 @@ clients.each{ |c| cgidiraddto = vhost['tnWebVHostCgiDirAddto'][0].gsub("\n", "\n\t") if vhost['tnWebVHostCgiDirAddto'] ssl = true if property['https'] == "only" + vhostgid = property['DirOwnerGroupNumber'] ? property['DirOwnerGroupNumber'].to_i : gid umask=File.umask File.umask(0000) - mkdir(home, 02755, uid, gid) - mkdir(home+"/htdocs", 02755, uid, gid) - mkdir(home+"/bin", 02755, 0, gid) - mkdir(home+"/cgi-bin", 02755, uid, gid) if property['cgi-bin'] == "yes" + mkdir(home, 02755, uid, vhostgid) + mkdir(home+"/htdocs", 02755, uid, 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) File.umask(umask) -- cgit v1.2.3