_change_privilege (Merb::Server)

    # File lib/merb-core/server.rb, line 324
          def _change_privilege(user, group=user)
            Merb.logger.warn! "Changing privileges to #{user}:#{group}"

            uid, gid = Process.euid, Process.egid

            begin
              target_uid = Etc.getpwnam(user).uid
            rescue ArgumentError => e
              Merb.fatal!("Failed to change to user #{user}, does the user exist?", e)
              return false
            end

            begin
              target_gid = Etc.getgrnam(group).gid
            rescue ArgumentError => e
              Merb.fatal!("Failed to change to group #{group}, does the group exist?", e)
              return false
            end

            if (uid != target_uid) || (gid != target_gid)
              # Change process ownership
              Process.initgroups(user, target_gid)
              Process::GID.change_privilege(target_gid)
              Process::UID.change_privilege(target_uid)
            end
            true
          rescue Errno::EPERM => e
            Merb.fatal! "Permission denied for changing user:group to #{user}:#{group}.", e
            false
          end