Bug #2280

include_shell does not work

Added by 00marcus almost 4 years ago. Updated over 3 years ago.

Status:FixedStart date:2010-12-18
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:-
Target version:1.4.29
Missing in 1.5.x:No

Description

I have two identical versions of lighttpd (1.4.19) installed on two slightly different debian machines. One is processing the include_shell directives as expected, the other one ignores them.

I have modified /usr/share/lighttpd/create-mime.assign.pl to drop a line to a logfile, whenever called -=> stays empty.

I'm attaching the output of
strace -fe trace=open /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf

for the working and non-working case.

While this might be a debian specific bug, you might be the guys able to find it.

works (5.84 KB) 00marcus, 2010-12-18 17:13

works-not (2.23 KB) 00marcus, 2010-12-18 17:13

works-not (2.46 KB) 00marcus, 2010-12-18 17:19

lighttpd.conf Magnifier (4.88 KB) 00marcus, 2010-12-18 17:31

create-mime.assign.pl Magnifier (530 Bytes) 00marcus, 2010-12-18 17:31

Associated revisions

Revision 2793
Added by stbuehler over 3 years ago

[proc,include_shell] log error if exec shell fails (fixes #2280)

History

#1 Updated by 00marcus almost 4 years ago

Hi,

the works-not file of the other post was from a test with lighttpd 1.4.28.

The one attached here is from the non-working 1.4.19 (i.e. there are three installations involved)

#2 Updated by spaam almost 4 years ago

your config?
the script?

#3 Updated by 00marcus almost 4 years ago

Both close to the defaults (and now attached)

#4 Updated by 00marcus almost 4 years ago

FIXED

Turns out, lighttpd did not execute the include_shell scripts when I run it from within a screen session. It works when I run it from without.

Comparing both environments and playing with them bit by bit, it turned out to be a nasty misconfig in my .screenrc. The line "shell bash" caused all the problems.

SHELL=bash

running
export SHELL=/bin/bash

(or fixing the .screenrc)
rendered the system back to working.

THanks anyways.

#5 Updated by stbuehler almost 4 years ago

  • Status changed from New to Invalid
  • Priority changed from High to Normal
  • Target version deleted (1.4.x)

#6 Updated by Olaf-van-der-Spek almost 4 years ago

  • Status changed from Invalid to Reopened

An error should be shown/logged if include_shell fails.

#7 Updated by Olaf-van-der-Spek almost 4 years ago

  • Target version set to 1.4.29

#8 Updated by cheungtifan over 3 years ago

I do not think it is a bug -- shell should be specified to execute the script, anyway.

It also appeared on FreeBSD, however I resolved by adding SHELL=/bin/sh on top of rc.d script.

#9 Updated by stbuehler over 3 years ago

  • Status changed from Reopened to Fixed
  • % Done changed from 0 to 100

Applied in changeset r2793.

Also available in: Atom