# Weird problem with script/server, lighttpd, and FreeBSD

**URL:** <https://www.ruby-forum.com/t/weird-problem-with-script-server-lighttpd-and-freebsd/99797>\
**Category:** Rails\
**Created:** [February 1, 2006, 6:39pm UTC](https://www.ruby-forum.com/t/weird-problem-with-script-server-lighttpd-and-freebsd/99797 "2006-02-01T18:39:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HSWade\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e19adc/32.png) [@HSWade\_M](https://www.ruby-forum.com/u/HSWade_M)\
**Post date:** [February 1, 2006, 6:39pm UTC](https://www.ruby-forum.com/t/weird-problem-with-script-server-lighttpd-and-freebsd/99797/1 "2006-02-01T18:39:56Z")

</div>

I installed lighttpd from ports on my FreeBSD-5 system last night,  
wanting  
to play with that instead of WEBrick for development work.

I installed it, and ran script/server, and got this:

[minter@carlton discostu]$ script/server  
=\> Booting lighttpd (use ‘script/server webrick’ to force WEBrick)  
=\> Rails application started on [http://0.0.0.0:3000](http://0.0.0.0:3000)  
=\> Call with -d to detach (requires absolute paths in  
config/lighttpd.conf)  
=\> Ctrl-C to shutdown server (see config/lighttpd.conf for options)  
2006-02-01 12:36:55: (server.c.432) Are you nuts ? Don’t apply a SUID  
bit  
to this binary

And that’s where it ends, complaining about an SUID bit on “this  
binary”.

I’ve checked the lighttpd binary, and it’s non-SUID:

[minter@carlton discostu]$ ls -lsa /usr/local/sbin/lighttpd  
134 -r-xr-xr-x 1 root wheel 136676 Jan 31 23:06  
/usr/local/sbin/lighttpd

And I can’t find anything else in the mix that might be going SUID.  
Anyone using lighttpd on FreeBSD that can shed some light on this?

–Wade

---

<div class="post-metadata">

**Author:** ![HSWade\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e19adc/32.png) [@HSWade\_M](https://www.ruby-forum.com/u/HSWade_M)\
**Post date:** [March 2, 2006, 9:49pm UTC](https://www.ruby-forum.com/t/weird-problem-with-script-server-lighttpd-and-freebsd/99797/2 "2006-03-02T21:49:57Z")

</div>

Hi Wade,

I got the same problem, and I remember resolving it by changing your  
primary group to other name than wheel. then restart freebsd.

I remember it was a bug of lighttpd’s suid logic. I think this problem  
is specific to Freebsd.

Hope this isn’t too late.

Lei

---

<div class="post-metadata">

**Author:** ![HSWade\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e19adc/32.png) [@HSWade\_M](https://www.ruby-forum.com/u/HSWade_M)\
**Post date:** [June 21, 2006, 5:36pm UTC](https://www.ruby-forum.com/t/weird-problem-with-script-server-lighttpd-and-freebsd/99797/3 "2006-06-21T17:36:25Z")

</div>

Lighttpd (as of revision 416) checks to see if either the effective uid  
OR the  
effective GID is zero and refuses to run if so.

So if you are the root user, or (like me) are in group wheel (0) by  
default,  
lighttpd will not run under your username. Either make something else  
your  
default group (probably best) or change your gid before starting  
lighttpd.

Rgds,  
Jerry
