lighttpd init file should not chown or chmod on status check

Bug #396632 reported by Joseph Piché
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
lighttpd (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: lighttpd

The lighttpd init file performs `chmod` and `chown` on the PID file every time it's run. This should only be done under certain actions of the init file as it is not necessary for the "status" action.

$ lsb_release -rd
Description: Ubuntu 9.04
Release: 9.04

Revision history for this message
Daniel Hahler (blueyed) wrote :

I cannot confirm this.

Are you referring to the following snippet?

# be sure there is a /var/run/lighttpd, even with tmpfs
mkdir -p /var/run/lighttpd > /dev/null 2> /dev/null
chown www-data:www-data /var/run/lighttpd
chmod 0750 /var/run/lighttpd

Changed in lighttpd (Ubuntu):
status: New → Incomplete
Revision history for this message
Joseph Piché (josephpiche) wrote :

I believe that is the offending code. Now that I think about it I should have titled this bug differently. The issue I saw was `/etc/init.d/lighttpd status` cannot be run as a non-root user. When I looked into why it couldn't be run, I saw that quoted code. Plus, shouldn't the user and group be pulled from a config file? Please let me know if I am missing something. Thanks.

Revision history for this message
Joseph Piché (josephpiche) wrote :

I believe this is related to bug 424991 in that `/etc/init.d/lighttpd` assumes directory locations and 109559 and permissions when this should be pulled from a config file like `/etc/default/lighttpd` or something.

I'm not familiar enough with with bash scripting to know what to do to fix this, otherwise I would write a patch. Could someone else please either confirm or deny that this is a bug?

Revision history for this message
Joseph Piché (josephpiche) wrote :

Sorry, I meant bug 109559--I had the wrong one in my clipboard.

Scott Moser (smoser)
Changed in lighttpd (Ubuntu):
status: Incomplete → Triaged
importance: Undecided → Low
Revision history for this message
gstrauss (gstrauss) wrote :
Changed in lighttpd (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.