about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/mongrel/configurator.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/mongrel/configurator.rb b/lib/mongrel/configurator.rb
index 223ad84..4fd81d6 100644
--- a/lib/mongrel/configurator.rb
+++ b/lib/mongrel/configurator.rb
@@ -55,6 +55,11 @@ module Mongrel
     # Change privilege of the process to specified user and group.
     def change_privilege(user, group)
       begin
+        if group && user
+          log "Initializing groups for #{user}:#{group}."
+          Process.initgroups(user, Etc.getgrnam(group).gid)
+        end
+        
         if group
           log "Changing group to #{group}."
           Process::GID.change_privilege(Etc.getgrnam(group).gid)