h2ooooooo / mongoose

Automatically exported from code.google.com/p/mongoose
MIT License
0 stars 0 forks source link

mongoose won't start as non root user #153

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add
# Switch to given user after startup. Default: not set.
uid www-data

to the mongoose.conf file
2. start mongoose

What is the expected output? What do you see instead?
I'd expect mongoose to bind to port 80 and then drop privilueges, but I'm 
getting following output:
Loading config file mongoose.conf
[1277218466] [error] [client 0.0.0.0] mg_open_listening_port(80): Permission 
denied
[1277218466] [error] [client 0.0.0.0] cannot bind to 80
[1277218466] [error] [client 0.0.0.0] mg_set_option(ports): failure

What version of the product are you using? On what operating system?
Tested with 2.9, $Rev: 517 on Debian ARM and with 2.8 on Slackware 13.1 x86_64.

Please provide any additional information below.
Binding to port 8080 works, but is not of much help if I want to access the 
webserver without specifying the port in the browser.

regards
Thorsten

Original issue reported on code.google.com by thenk...@gmail.com on 22 Jun 2010 at 3:07

GoogleCodeExporter commented 9 years ago
Is ports option specified after uid option?
If yes, make uid option to be the last one in the config file.

Currently the option order is important in some cases (like this one), I am 
going to fix this.

Original comment by valenok on 22 Jun 2010 at 3:24

GoogleCodeExporter commented 9 years ago
Indeed, I've changed the sort order of these two options and now it starts. But 
now I've found another problem:
It seems mongoose does not drop all of it's root rights. I've got a shell 
script cgi which calles another program. Both are owned by root and have 700 
access rights (only executable by root). Mongoose still executes executes both 
when running as another user.
Furthermore "top" shows root as process owner of the mongoose processes.

Original comment by thenk...@gmail.com on 22 Jun 2010 at 3:40

GoogleCodeExporter commented 9 years ago
Can you confirm that this is still an issue, please?
Please use the latest source.

Original comment by valenok on 23 Aug 2010 at 8:49

GoogleCodeExporter commented 9 years ago
Can you confirm that this is still an issue, please?
Please use the latest source.

Original comment by valenok on 23 Aug 2010 at 8:49

GoogleCodeExporter commented 9 years ago
Fixed in 2.10.

Original comment by thenk...@gmail.com on 14 Sep 2010 at 8:41