# Trouble starting Mongrel under user:group mongrel:mongrel

**URL:** <https://www.ruby-forum.com/t/trouble-starting-mongrel-under-user-group-mongrel-mongrel/113124>\
**Category:** Deployment\
**Created:** [August 27, 2007, 9:14pm UTC](https://www.ruby-forum.com/t/trouble-starting-mongrel-under-user-group-mongrel-mongrel/113124 "2007-08-27T21:14:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dxk3355](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/d6d6ee/32.png) [@dxk3355](https://www.ruby-forum.com/u/dxk3355)\
**Post date:** [August 27, 2007, 9:14pm UTC](https://www.ruby-forum.com/t/trouble-starting-mongrel-under-user-group-mongrel-mongrel/113124/1 "2007-08-27T21:14:08Z")

</div>

Hi!

I’m trying to start mongrel, but this time as user mongrel:

mongrel\_rails start --user mongrel --group mongrel

Result is:

\*\* Ruby version is not up-to-date; loading cgi\_multipart\_eof\_fix  
\*\* Starting Mongrel listening at 0.0.0.0:3000  
\*\* Changing group to mongrel.  
\*\* FAILED to change user:group mongrel:mongrel: Operation not permitted

Ruby: 1.85, Rails: 1.2.3, Mongrel: 1.01, Ubuntu: 6.06

I added Mongrel user with:

adduser --system --group --no-create-home mongrel

Thank you for helping me,  
David

---

<div class="post-metadata">

**Author:** ![dxk3355](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/d6d6ee/32.png) [@dxk3355](https://www.ruby-forum.com/u/dxk3355)\
**Post date:** [August 27, 2007, 9:23pm UTC](https://www.ruby-forum.com/t/trouble-starting-mongrel-under-user-group-mongrel-mongrel/113124/2 "2007-08-27T21:23:18Z")

</div>

I ran into something similar a few weeks ago. I ended up running my  
mongrel with www-data instead of mongrel as the user/group since  
that’s what my nginx runs as. (not sure if that’s bad… anyone?)

Regarding the ruby version, I updated my installation to 1.8.6 manually:  
[http://codersifu.blogspot.com/2007/03/howto-install-ruby-in-ubuntu-edgy-610.html](http://codersifu.blogspot.com/2007/03/howto-install-ruby-in-ubuntu-edgy-610.html)  
[http://www.urbanpuddle.com/articles/2007/08/17/mongrel-cluster-1-0-2-and-ruby-1-8-5](http://www.urbanpuddle.com/articles/2007/08/17/mongrel-cluster-1-0-2-and-ruby-1-8-5)

cheers,  
Vince

On 8/27/07, D. Krmpotic [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> \*\* Ruby version is not up-to-date; loading cgi\_multipart\_eof\_fix
> 
> ## Thank you for helping me, David
> 
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

–  
support independent business – [http://www.buyindie.net/](http://www.buyindie.net/)

---

<div class="post-metadata">

**Author:** ![dxk3355](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/d6d6ee/32.png) [@dxk3355](https://www.ruby-forum.com/u/dxk3355)\
**Post date:** [August 27, 2007, 9:38pm UTC](https://www.ruby-forum.com/t/trouble-starting-mongrel-under-user-group-mongrel-mongrel/113124/3 "2007-08-27T21:38:22Z")

</div>

On 8/27/07, D. Krmpotic [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’m trying to start mongrel, but this time as user mongrel:  
> mongrel\_rails start --user mongrel --group mongrel  
> \*\* FAILED to change user:group mongrel:mongrel: Operation not permitted

A process needs to start under root to be allowed to change their  
effective user id like this. So, try “sudo mongrel\_rails start --user  
mongrel --group mongrel”.

–  
Alexey V.  
CruiseControl.rb [[http://cruisecontrolrb.thoughtworks.com](http://cruisecontrolrb.thoughtworks.com)]  
RubyWorks [[http://rubyworks.thoughtworks.com](http://rubyworks.thoughtworks.com)]

---

<div class="post-metadata">

**Author:** ![dxk3355](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/d6d6ee/32.png) [@dxk3355](https://www.ruby-forum.com/u/dxk3355)\
**Post date:** [August 27, 2007, 10:00pm UTC](https://www.ruby-forum.com/t/trouble-starting-mongrel-under-user-group-mongrel-mongrel/113124/4 "2007-08-27T22:00:54Z")

</div>

OK, thank you. That made sense… I’ll see how everything goes with  
capistrano etc. Maybe there’ll be some problems because of this sudo…  
but I’ll find out soon enough…

For now I have another question… It’s regarding stale PID files… the  
solution is here:

[http://textsnippets.com/posts/show/931](http://textsnippets.com/posts/show/931)

but I don’t know where exactly to add this… if I look at the patch -  
this line for example: “config =  
Mongrel::Rails::RailsConfigurator.new(settings) do”. It seems to me that  
this should exist in my file… right? And it doesn’t…

I don’t want to apply this patch blindly (maybe it’s for different  
version than 1.01). And since I don’t know a whole lot about patches,  
I’d like to ask you how exactly do I do that… thank you!  
david

Alexey V. wrote:

> On 8/27/07, D. Krmpotic [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > I’m trying to start mongrel, but this time as user mongrel:  
> > mongrel\_rails start --user mongrel --group mongrel  
> > \*\* FAILED to change user:group mongrel:mongrel: Operation not permitted
> 
> A process needs to start under root to be allowed to change their  
> effective user id like this. So, try “sudo mongrel\_rails start --user  
> mongrel --group mongrel”.
> 
> –  
> Alexey V.  
> CruiseControl.rb [[http://cruisecontrolrb.thoughtworks.com](http://cruisecontrolrb.thoughtworks.com)]  
> RubyWorks [[http://rubyworks.thoughtworks.com](http://rubyworks.thoughtworks.com)]

---

<div class="post-metadata">

**Author:** ![dxk3355](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/d6d6ee/32.png) [@dxk3355](https://www.ruby-forum.com/u/dxk3355)\
**Post date:** [August 28, 2007, 2:19pm UTC](https://www.ruby-forum.com/t/trouble-starting-mongrel-under-user-group-mongrel-mongrel/113124/5 "2007-08-28T14:19:34Z")

</div>

forget it… it’s obvious… I had a problem because I must have done  
something wrong when searching for RailsConfigurator.

bye, david
