Weird problem with script/server, lighttpd, and FreeBSD


#1

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
=> 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


#2

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


#3

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