search for: change_privilege

Displaying 6 results from an estimated 6 matches for "change_privilege".

2007 Jun 04
8
Bug in Configurator.change_privilege?
...a slight addition to mongrel-1.0.1/lib/mongrel/configurator.rb as follows: --- configurator.rb.orig 2007-05-28 04:22:11.000000000 -0400 +++ configurator.rb 2007-05-28 04:11:02.000000000 -0400 @@ -55,6 +55,11 @@ # Change privilege of the process to specified user and group. def change_privilege(user, group) begin + if group && user + log "Initialising groups for {#user}:{#group}." + Process.initgroups(user,Etc.getgrnam(group).gid) + end + if group log "Changing group to #{group}." Process::GI...
2011 May 19
2
unicorn doesn't restart properly after cap deploy (not using Bundler)
...r, group = ''apache'', ''apache'' ? ? target_uid = Etc.getpwnam(user).uid ? ? target_gid = Etc.getgrnam(group).gid ? ? worker.tmp.chown(target_uid, target_gid) ? ? if uid != target_uid || gid != target_gid ? ? ? Process.initgroups(user, target_gid) ? ? ? Process::GID.change_privilege(target_gid) ? ? ? Process::UID.change_privilege(target_uid) ? ? end ? rescue => e ? ? if RAILS_ENV == ''development'' ? ? ? STDERR.puts "couldn''t change user, oh well" ? ? else ? ? ? raise e ? ? end ? end end before_exec do |server| ? STDERR.puts "BEFORE E...
2006 Jun 22
5
changing user/group on port 80
I''m trying to run mongrel on port 80 and switch to a different user/group from root. As root, this works: mongrel_rails start -p 3000 -u rails --group rails This: mongrel_rails start -p 80 -u rails --group rails dies with: --------------------------- ** Changing group to rails. ** Changing user to rails. ** Starting Mongrel listening at 0.0.0.0:80
2006 May 20
9
Mongrel 0.3.13 Update -- Code Review, Code Coverage
Hey Folks, I''ve been holding off the official 0.3.13 release so that Luis can get the win32 side very nice and clean. We fixed a major problem last night so it''s only a short time before we get it out. Luis is working really hard on it, so just be patient. In the meantime, I''ve been doing a code audit of the Mongrel code as it is now and fixing any little things I
2008 Mar 11
4
Dropping Root
Hello Campers I''m not sure this is the right list to ask but: I''m using the junebug wiki (which is written in camping) for my own personal wiki. I''d like it to behave as a proper daemon, so it will start up at boot, get stopped properly at shutdown, keep a pid file in /var/run etc. This requires a little messing with the wiki script junebug makes in the wiki
2011 Jun 16
7
[PATCH] replace fchmod()-based heartbeat with raindrops
...(:nr, :tmp, :switched) uid = Etc.getpwnam(user).uid gid = Etc.getgrnam(group).gid if group Unicorn::Util.chown_logs(uid, gid) - tmp.chown(uid, gid) + @tmp.chown(uid, gid) if @tmp if gid && Process.egid != gid Process.initgroups(user, gid) Process::GID.change_privilege(gid) end Process.euid != uid and Process::UID.change_privilege(uid) - self.switched = true + @switched = true end end diff --git a/script/isolate_for_tests b/script/isolate_for_tests index 1c9d9b1..96848c1 100755 --- a/script/isolate_for_tests +++ b/script/isolate_for_tests @@ -...