#163 new
diabeteman

thin starting as root (ignoring the "user" parameter)

Reported by diabeteman | July 17th, 2012 @ 05:32 PM | in Future

Hello,

I use thin on Gentoo and I couldn't start the processes as other users than root.

Here is my config file /etc/thin/redmine.yml:

---
chdir: /var/lib/redmine
environment: production
address: 127.0.0.1
port: 3333
timeout: 30
log: log/thin.log
pid: tmp/pids/thin.pid
max_conns: 1024
max_persistent_conns: 512
require: []
wait: 30
servers: 3
user: redmine
daemonize: true

When I run the server :

# /etc/init.d/thin start
 * Starting all thin servers in /etc/thin/ ...
[start] /etc/thin//redmine.yml ...
Starting server on 127.0.0.1:3333 ... 
Starting server on 127.0.0.1:3334 ... 
Starting server on 127.0.0.1:3335 ...                        [ ok ]

The processes are run by root:

# ps -ef | grep thin
root      3287     1 72 23:26 ?        00:00:14 thin server (127.0.0.1:3333)
root      3297     1 66 23:26 ?        00:00:11 thin server (127.0.0.1:3334)
root      3308     1 64 23:26 ?        00:00:09 thin server (127.0.0.1:3335)

After several attempts, I finally added the "group" parameter to the config file:

---
chdir: /var/lib/redmine
environment: production
address: 127.0.0.1
port: 3333
timeout: 30
log: log/thin.log
pid: tmp/pids/thin.pid
max_conns: 1024
max_persistent_conns: 512
require: []
wait: 30
servers: 3
user: redmine
group: redmine
daemonize: true

And it worked !

# ps -ef | grep thin
redmine   3395     1 81 23:29 ?        00:00:07 thin server (127.0.0.1:3333)
redmine   3405     1 71 23:29 ?        00:00:05 thin server (127.0.0.1:3334)
redmine   3415     1 65 23:29 ?        00:00:03 thin server (127.0.0.1:3335)

Is it a bug from thin or something that is related to my system? I can reproduce the same behaviour every time.

Here is some more info on my system:

# uname -a
Linux jacky.diabeteman.com 3.2.12-gentoo #1 SMP Sun Apr 8 04:50:29 CEST 2012 x86_64 Intel(R) Atom(TM) CPU D425 @ 1.80GHz GenuineIntel GNU/Linux
# ruby --version
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]
# thin --version
thin 1.3.1 codename Triple Espresso

Tell me if you need more information.

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Pages