diff options
author | Peter Palfrader <peter@palfrader.org> | 2006-11-03 22:08:17 +0000 |
---|---|---|
committer | weasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede> | 2006-11-03 22:08:17 +0000 |
commit | 03eefaa983a7f16902365850a8fbb0514d7e8c2c (patch) | |
tree | 5ce811014b12acfaf6024d228b178cbdb6adc421 | |
parent | 182db49f9009f361473da8c27b100be38dc84992 (diff) |
Allow giving another gid for directory ownership
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@241 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
-rwxr-xr-x | bin/ldap2apache | 11 |
1 files 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) |