[Mongrel] OSX requires sudo for using ports 1024

2006-11-16 Thread Matt Pelletier

I assume some of you have run into this error before when trying to run
mongrel on port 80 (or another port  1024) in OSX:

$ mongrel_rails start -p 80
** Starting Mongrel listening at 0.0.0.0:80
/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel/tcphack.rb:12:in
`initialize_without_backlog': Permission denied - bind(2) (Errno::EACCES)
   from 
/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel/tcphack.rb:12:in
`initialize'
   from 
/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel.rb:536:in
`initialize'
   from 
/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel/configurator.rb:128:in
`listener'
   from 
/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/bin/mongrel_rails:96:in
`cloaker_'
   from 
/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel/configurator.rb:51:in
`initialize'
   from 
/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/bin/mongrel_rails:83:in
`run'
   from 
/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel/command.rb:211:in
`run'
   from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14
/bin/mongrel_rails:235
   from /usr/local/bin/mongrel_rails:18

Mongrel runs without sudo on all other ports  1024 otherwise. Anyone have
the reason that these ports require sudo?

Matt

--
--
Matt Pelletier
http://www.eastmedia.com -- EastMedia
http://www.informit.com/title/0321483502 -- The Mongrel Book
http://identity.eastmedia.com -- OpenID, Identity 2.0
___
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users

Re: [Mongrel] OSX requires sudo for using ports 1024

2006-11-16 Thread Jarkko Laine


On 16.11.2006, at 19.37, Matt Pelletier wrote:
Mongrel runs without sudo on all other ports  1024 otherwise.  
Anyone have the reason that these ports require sudo?


I think it is pretty common to require sudo to run on privileged  
ports. I guess it might be because otherwise any user could start  
acting as the web server in the internet (assuming the port is not  
blocked by a firewall).


//jarkko

--
Jarkko Laine
http://jlaine.net
http://dotherightthing.com
http://www.railsecommerce.com
http://odesign.fi




smime.p7s
Description: S/MIME cryptographic signature
___
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users

Re: [Mongrel] OSX requires sudo for using ports 1024

2006-11-16 Thread Brad Ediger
On UNIX-derived systems, ports below 1024 are privileged and can only  
be accessed as root.


On Nov 16, 2006, at 11:37 AM, Matt Pelletier wrote:

I assume some of you have run into this error before when trying to  
run mongrel on port 80 (or another port  1024) in OSX:


$ mongrel_rails start -p 80
** Starting Mongrel listening at 0.0.0.0:80
/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel/ 
tcphack.rb:12:in `initialize_without_backlog': Permission denied -  
bind(2) (Errno::EACCES)
from /usr/local/lib/ruby/gems/1.8/gems/mongrel- 0.3.14/lib/ 
mongrel/tcphack.rb:12:in `initialize'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/ 
mongrel.rb:536:in `initialize'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/ 
mongrel/configurator.rb:128:in `listener'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/bin/ 
mongrel_rails:96:in `cloaker_'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/ 
mongrel/configurator.rb:51:in `initialize'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel- 0.3.14/bin/ 
mongrel_rails:83:in `run'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/ 
mongrel/command.rb:211:in `run'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/bin/ 
mongrel_rails:235

from /usr/local/bin/mongrel_rails:18

Mongrel runs without sudo on all other ports  1024 otherwise.  
Anyone have the reason that these ports require sudo?


Matt

--
--
Matt Pelletier
http://www.eastmedia.com -- EastMedia
http://www.informit.com/title/0321483502 -- The Mongrel Book
http://identity.eastmedia.com -- OpenID, Identity 2.0
___
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users


___
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users

Re: [Mongrel] OSX requires sudo for using ports 1024

2006-11-16 Thread Philip Hallstrom
 I assume some of you have run into this error before when trying to run
 mongrel on port 80 (or another port  1024) in OSX:

 $ mongrel_rails start -p 80
 ** Starting Mongrel listening at 0.0.0.0:80
 /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel/tcphack.rb:12:in
 `initialize_without_backlog': Permission denied - bind(2) (Errno::EACCES)
   from 
 /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel/tcphack.rb:12:in
 `initialize'
   from 
 /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel.rb:536:in
 `initialize'
   from 
 /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel/configurator.rb:128:in
 `listener'
   from 
 /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/bin/mongrel_rails:96:in
 `cloaker_'
   from 
 /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel/configurator.rb:51:in
 `initialize'
   from 
 /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/bin/mongrel_rails:83:in
 `run'
   from 
 /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel/command.rb:211:in
 `run'
   from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14
 /bin/mongrel_rails:235
   from /usr/local/bin/mongrel_rails:18

 Mongrel runs without sudo on all other ports  1024 otherwise. Anyone have
 the reason that these ports require sudo?

This is the way it is on all unixes...  ports under 1024 tend to be well 
known.  25 for smtp, 80 for http.  So the OS won't let you use that port 
unless you are root so that joe-random-user can't start up some subversive 
web server on that port...

-philip
___
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users