Bug 1201056 - lighttpd should own /var/www/lighttpd
Summary: lighttpd should own /var/www/lighttpd
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: lighttpd
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-11 23:57 UTC by Christian Stadelmann
Modified: 2016-10-21 15:52 UTC (History)
2 users (show)

Fixed In Version: lighttpd-1.4.41-2.fc25 lighttpd-1.4.41-2.fc24 lighttpd-1.4.41-2.fc23 lighttpd-1.4.41-2.el6 lighttpd-1.4.41-2.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-12 18:59:42 UTC
Type: Bug


Attachments (Terms of Use)

Description Christian Stadelmann 2015-03-11 23:57:39 UTC
Description of problem:
/var/www/lighttpd is owned by root:root. Since this is lighttpd's working directory it should be owned by lighttpd:lighttpd.

Version:
lighttpd 1.4.35

Comment 1 Fedora End Of Life 2015-11-04 13:13:28 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Christian Stadelmann 2015-11-04 19:19:21 UTC
Still present.

Comment 3 Gwyn Ciesla 2016-06-28 17:40:24 UTC
This is by design.  Why is this necessary?  /etc/lighttpd/lighttd.conf does not use this location in Fedora 24, and neither does /etc/lighttpd/conf.d/*.

Comment 4 Christian Stadelmann 2016-06-28 21:04:18 UTC
Last time I checked lighttpd was using /var/www/lighttpd as webroot.

Additionally, the package ships content in /var/www/lighttpd.

One of these is wrong, either shipping and using /var/www/lighttpd or having wrong permissions/ownership on these files.

Comment 5 Glenn S 2016-07-03 02:28:01 UTC
/etc/lighttpd/lighttpd.conf defines var.server_root = "/var/www" and /etc/lighttpd/lighttpd.conf and /etc/lighttpd/conf.d/* use server_root in:
server_root + "/cgi-bin..."
server_root + "/downloads..."
server_root + "/htdocs..."
server_root + "/rails..."
server_root + "/users..."
server_root + "/vhosts..."

These are subdirs of /var/www, and perhaps they should all be subdirs of /var/www/lighttpd/, but right now are not.  If nothing else is done, /var/www/lighttpd should probably be renamed /htdocs.  However, I have what I think is a better suggestion:

I would instead suggest that /etc/lighttpd/lighttpd.conf be updated to define var.server_root = "/var/www/lighttpd", and that the lighttpd RPM package be updated to create the various subdirs, with appropriate permissions, including moving the current contents of /var/www/lighttpd/ into /var/www/lighttpd/htdocs/

Comment 6 Gwyn Ciesla 2016-07-13 15:07:01 UTC
Interesting.  Does lighttpd create those subdirs at runtime or do they need to be created manually after RPM install?

Comment 7 Christian Stadelmann 2016-07-13 15:32:51 UTC
(In reply to Jon Ciesla from comment #6)
> Interesting.  Does lighttpd create those subdirs at runtime or do they need
> to be created manually after RPM install?

Have a look at https://apps.fedoraproject.org/packages/lighttpd/contents to see what is installed by the RPM (contained in the RPM).

Comment 8 Gwyn Ciesla 2016-07-13 15:45:40 UTC
I know, I mean, are the subdirs created by the program itself or did you make them?  They're not in the RPM, so the solution depends on how the subdirs got there.

Comment 9 Glenn S 2016-07-13 16:06:34 UTC
lighttpd does not create those dirs at startup.

Looking at http://pkgs.fedoraproject.org/git/rpms/lighttpd.git, I see that http://pkgs.fedoraproject.org/git/rpms/lighttpd.git changes the document root, but that http://pkgs.fedoraproject.org/git/rpms/lighttpd.git does not.
This is missing from the second patch, and the issue raised in this ticket:
-server.document-root = server_root + "/htdocs"
+server.document-root = server_root + "/lighttpd"

Comment 10 Glenn S 2016-07-13 16:08:11 UTC
(and what should the ownership and permissions be on /var/www/lighttpd/?)

Comment 11 Christian Stadelmann 2016-07-13 16:46:20 UTC
(In reply to Jon Ciesla from comment #8)
> I know, I mean, are the subdirs created by the program itself or did you
> make them?  They're not in the RPM, so the solution depends on how the
> subdirs got there.

I don't care about the subdirs. /var/www/lighttpd is created by the lighttpd package on installation. It should be owned by lighttpd:lighttpd so permissions can be rwx------ for directories and rw------- for files. Users don't have to read /var/www/lighttpd, and my sql database or email server doesn't either.

Comment 12 Glenn S 2016-07-13 17:47:29 UTC
(reposting with updated patch names)

Looking at http://pkgs.fedoraproject.org/git/rpms/lighttpd.git, I see that  lighttpd-1.4.28-defaultconf.patch changes server.document-root, but that lighttpd-1.4.39-defaultconf.patch does not.  The following is missing from the second patch:
-server.document-root = server_root + "/htdocs"
+server.document-root = server_root + "/lighttpd"

Comment 13 Glenn S 2016-08-05 06:17:25 UTC
Jon: would you review the above notes for packaging with lighttpd 1.4.41?  Thanks.

Comment 14 Gwyn Ciesla 2016-08-05 13:33:05 UTC
Correcting that patch and setting the ownership and permissions as in comment 11 is good with me.  If all are in favour I'll push an update.

Comment 15 Christian Stadelmann 2016-09-28 22:26:34 UTC
(In reply to Jon Ciesla from comment #14)
> Correcting that patch and setting the ownership and permissions as in
> comment 11 is good with me.  If all are in favour I'll push an update.

It's ok for me too.

Comment 16 Gwyn Ciesla 2016-09-30 13:32:31 UTC
Cool, I'll get this out.

Comment 17 Fedora Update System 2016-09-30 20:23:17 UTC
lighttpd-1.4.41-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-ce7d07124b

Comment 18 Fedora Update System 2016-10-01 04:49:18 UTC
lighttpd-1.4.41-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-1fee8eee35

Comment 19 Fedora Update System 2016-10-01 05:26:34 UTC
lighttpd-1.4.41-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-cdf61dde70

Comment 20 Fedora Update System 2016-10-01 05:27:27 UTC
lighttpd-1.4.41-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-c53b6ee2b2

Comment 21 Fedora Update System 2016-10-01 05:49:32 UTC
lighttpd-1.4.41-2.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-e62a847e5c

Comment 22 Fedora Update System 2016-10-12 18:59:42 UTC
lighttpd-1.4.41-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 23 Fedora Update System 2016-10-12 23:23:31 UTC
lighttpd-1.4.41-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 24 Fedora Update System 2016-10-13 02:54:06 UTC
lighttpd-1.4.41-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 25 Fedora Update System 2016-10-19 02:18:45 UTC
lighttpd-1.4.41-2.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.

Comment 26 Fedora Update System 2016-10-21 15:52:34 UTC
lighttpd-1.4.41-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.