[Mongrel] OSX requires sudo for using ports < 1024

Ezra Zygmuntowicz ezmobius at gmail.com
Thu Nov 16 15:42:11 EST 2006


Matt-

	All unix style operating systems require root access to use any port  
less than 1024. Its just a fact of life on any linux, bsd or osx system.

Cheers-
-Ezra


On Nov 16, 2006, at 9: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 at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users

-- Ezra Zygmuntowicz 
-- Lead Rails Evangelist
-- ez at engineyard.com
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)




More information about the Mongrel-users mailing list