Does the -u and -g switches truely work?

1 view
Skip to first unread message

Gump

unread,
Jan 18, 2008, 2:21:09 PM1/18/08
to thin-ruby
When I start thin using the -u and -g switches (to run thin under the
www-data user), it says that it is changing the process privilege to
www-data:www-data however when I run ps or top, I see the processes
running under my username. Anyone else have experience with this? I
think Thin is a great server, and I love the idea of supporting Rack.
It would just be better if I could truly get it to run under the www-
data account like nginx is. Thanks in advance.

-Forrest

macournoyer

unread,
Jan 18, 2008, 2:40:04 PM1/18/08
to thin-ruby
hmm, I think you're right. Doesn't seem to be working.
I'll let you know when I fix it.

For now you can start thin like this to make it work (not tested):

sudo -u www-data thin -d ...your options...

thx for reporting this Gump!

Kevin Williams

unread,
Jan 18, 2008, 10:51:13 PM1/18/08
to thin...@googlegroups.com
I checked this locally on my laptop as well as on my blog server, and
it worked both places. I checked the code, and the rdocs for changing
euid and egid, and everything looks fine to me (not that I would know,
but I checked).

On Jan 18, 2008 12:40 PM, macournoyer <macou...@gmail.com> wrote:
>
> hmm, I think you're right. Doesn't seem to be working.
> I'll let you know when I fix it.
>
> For now you can start thin like this to make it work (not tested):
>
> sudo -u www-data thin -d ...your options...
>
> thx for reporting this Gump!
>
>

> On Jan 18, 2:21pm, Gump <forrest.robert...@gmail.com> wrote:
> > When I start thin using the -u and -g switches (to run thin under the
> > www-data user), it says that it is changing the process privilege to
> > www-data:www-data however when I run ps or top, I see the processes
> > running under my username. Anyone else have experience with this? I
> > think Thin is a great server, and I love the idea of supporting Rack.
> > It would just be better if I could truly get it to run under the www-
> > data account like nginx is. Thanks in advance.
> >
> > -Forrest
> >
>

--
Cheers,

Kevin Williams
http://www.bantamtech.com/

macournoyer

unread,
Jan 18, 2008, 11:08:06 PM1/18/08
to thin-ruby
ok I think I found the bug. It was because privileges were changed
before demonizing the script. I just changed the ordering and now it
works.

You can install from source if you can't wait for next release:

git clone git://github.com/macournoyer/thin.git
cd thin
sudo rake install

On Jan 18, 10:51 pm, "Kevin Williams" <kev...@gmail.com> wrote:
> I checked this locally on my laptop as well as on my blog server, and
> it worked both places.  I checked the code, and the rdocs for changing
> euid and egid, and everything looks fine to me (not that I would know,
> but I checked).
>
Reply all
Reply to author
Forward
0 new messages