ts-7000
[Top] [All Lists]

[ts-7000] Re: lighttpd only runs as root

To:
Subject: [ts-7000] Re: lighttpd only runs as root
From: "j.chitte" <>
Date: Wed, 17 Jun 2009 21:36:10 -0000
--- In  hermann schwärzler <> 
wrote:
>
> hello
>
> j.chitte schrieb:
>
> > I am running lighttpd in a 2.6 eabi installation. All seems well
> > except that it cannot start if I configure it with a user and group
> > name.
> >
> > A quick dredge of the source shows it calls two library functions:
> > getpwnam getgrpnam. These are apparently failing are returning null
> > pointers.
>
> you are compiling it yourself?
> if yes, how about changing the following lines in server.c (starting
> with line 719 in the 1.4.22-version):
>
> if (NULL == (pwd = getpwnam(srv->srvconf.username->ptr))) {
>    log_error_write(srv, __FILE__, __LINE__, "sb",
>                    "can't find username", srv->srvconf.username);
>    return -1;
> }
>
> by
> inserting
>    int errsv = errno;
> before
>    log_error_write...
>
> and
>    log_error_write(srv, __FILE__, __LINE__, "ss",
>                    "getpwnam: ", strerror(errsv));
> before
>    return -1;
>
> this should give you a detailed error-message in your error-log.
>
> if this gives strange errors, try
> errno = 0;
> before
> if (NULL == ...
>
>
> regards
> hermann
>

Thanks , that's very good idea. I'll check it out.




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
    
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU