Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 426774 - www-server/lighttpd: checkpath call in init script doesn't respect lighttpd configuration
Summary: www-server/lighttpd: checkpath call in init script doesn't respect lighttpd c...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Markos Chandras (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-16 05:08 UTC by Corentin Chary (RETIRED)
Modified: 2012-07-31 20:48 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Corentin Chary (RETIRED) gentoo-dev 2012-07-16 05:08:42 UTC
In /etc/init.d/lighttpd, there is:
checkpath -d -q -m 0750 -o lighttpd:lighttpd /var/run/lighttpd/

The issue is that I use multiple instance of lighttpd (ln -s /etc/init.d/lighttpd /etc/init.d/lighttpd.foo) with different users and different directories under /var/run/lighttpd/

Since there is no real way to parse lighttpd configuration in the init script, we could at least define LIGHTTPD_RUNDIR/USER/GROUP variables in /etc/conf.d/lighttpd (but this should be synced with lighttpd configuration by the user).

I think it's also acceptable to drop this call, maybe when SVCNAME is not lighttpd ?


Reproducible: Always
Comment 1 Markos Chandras (RETIRED) gentoo-dev 2012-07-17 18:47:36 UTC
Not sure if this kind of setup is common to most of us
Comment 2 Corentin Chary (RETIRED) gentoo-dev 2012-07-18 20:15:44 UTC
Simply changing the user or the rundir in lighttpd.conf will break, you don't even need to use multiple instances.
Comment 3 Markos Chandras (RETIRED) gentoo-dev 2012-07-19 20:20:59 UTC
I presume it would be possible to read the lighttpd.conf file multiple times within the init script and extract the necessary variables. If you can come up with a patch that would be nice otherwise it might take a while to implement it myself
Comment 4 Corentin Chary (RETIRED) gentoo-dev 2012-07-20 07:33:42 UTC
Reading lighttpd.conf will be pretty hard, since it's a real language with includes and variables.

Also, in the default configuration file as provided by gentoo, lighttpd doesn't even use /var/run/lighttpd/, it uses /var/run/lighttpd.pid

I'd suggest removing checkpath completly.
Comment 5 Markos Chandras (RETIRED) gentoo-dev 2012-07-24 18:30:51 UTC
(In reply to comment #4)
> Reading lighttpd.conf will be pretty hard, since it's a real language with
> includes and variables.
> 
> Also, in the default configuration file as provided by gentoo, lighttpd
> doesn't even use /var/run/lighttpd/, it uses /var/run/lighttpd.pid
> 
> I'd suggest removing checkpath completly.

I object to that. checkpath is there for a reason. To ensure that the directory exists and proper permissions are set. It is better to have it, even if the directory is hard-coded, than not having it at all
Comment 6 Corentin Chary (RETIRED) gentoo-dev 2012-07-24 19:29:09 UTC
But, well, as I pointed, /var/run/lighttpd/ is not used in default configuration as shipped by lighttpd or gentoo. Only /var/run/lighttpd.pid is used.

Feel free to mark this as WONTFIX or INVALID if you really want to keep checkpath, if this is the case I 'll simply move to /var/run/lighttpd-multi/ :)
Comment 7 Markos Chandras (RETIRED) gentoo-dev 2012-07-31 20:48:37 UTC
(In reply to comment #6)
> But, well, as I pointed, /var/run/lighttpd/ is not used in default
> configuration as shipped by lighttpd or gentoo. Only /var/run/lighttpd.pid
> is used.
> 
> Feel free to mark this as WONTFIX or INVALID if you really want to keep
> checkpath, if this is the case I 'll simply move to /var/run/lighttpd-multi/
> :)

Yeah truth is I don't know where this /var/run/lighttpd/ comes from but (at least on my servers) it seems to be used by lighttpd anyway. Marking this as WONTFIX anyway