Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] lighttpd: Adding /var/log/lighttpd folder with the owner www-data The lighttpd need to write in his root log folder
@ 2018-07-27 21:35 Laurent Hartanerot
  2018-07-28  8:21 ` Arnout Vandecappelle
  2018-07-30 10:24 ` [Buildroot] [PATCH v2 1/1] lighttpd: Add systemd tmpfile to fix lighttpd systemd boot Laurent Hartanerot
  0 siblings, 2 replies; 5+ messages in thread
From: Laurent Hartanerot @ 2018-07-27 21:35 UTC (permalink / raw)
  To: buildroot

From: Laurent Hartanerot <laurent.hartanerot@atos.net>

Lighttpd don't start with the default buildroot configuration

/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
2018-06-22 11:21:34: (server.c.733) opening errorlog '/var/log/lighttpd-error.log' failed: Permission denied
2018-06-22 11:21:34: (server.c.1420) Opening errorlog failed. Going down.


Signed-off-by: Laurent Hartanerot <laurent.hartanerot@atos.net>
---
 package/lighttpd/0001-Fix-default-config-file.patch | 6 ++----
 package/lighttpd/lighttpd.mk                        | 5 +++++
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/package/lighttpd/0001-Fix-default-config-file.patch b/package/lighttpd/0001-Fix-default-config-file.patch
index ada1589760..4fa5902718 100644
--- a/package/lighttpd/0001-Fix-default-config-file.patch
+++ b/package/lighttpd/0001-Fix-default-config-file.patch
@@ -1,6 +1,5 @@
 Modify the default lighttpd configuration file to have one a starting conf

-  * Changed the log path to /var/log and logs filenames
   * Disable IPv6
   * Do not setuid to a user that doesn't exist on the system
   * Disable pdf ranges fix for Adobe Reader since it uses regex and we
@@ -27,13 +26,12 @@ diff -Nura lighttpd-1.4.37.orig/doc/config/conf.d/access_log.conf lighttpd-1.4.3
 diff -Nura lighttpd-1.4.37.orig/doc/config/lighttpd.conf lighttpd-1.4.37/doc/config/lighttpd.conf
 --- lighttpd-1.4.37.orig/doc/config/lighttpd.conf	2015-09-01 14:38:48.684673663 -0300
 +++ lighttpd-1.4.37/doc/config/lighttpd.conf	2015-09-01 14:39:40.256442492 -0300
-@@ -13,8 +13,8 @@
+@@ -14,8 +14,8 @@
  ## if you add a variable here. Add the corresponding variable in the
  ## chroot example aswell.
  ##
--var.log_root    = "/var/log/lighttpd"
+ var.log_root    = "/var/log/lighttpd"
 -var.server_root = "/srv/www"
-+var.log_root    = "/var/log"
 +var.server_root = "/var/www"
  var.state_dir   = "/var/run"
  var.home_dir    = "/var/lib/lighttpd"
diff --git a/package/lighttpd/lighttpd.mk b/package/lighttpd/lighttpd.mk
index c565fed4ff..4fa1614c38 100644
--- a/package/lighttpd/lighttpd.mk
+++ b/package/lighttpd/lighttpd.mk
@@ -67,6 +67,7 @@ endif
 define LIGHTTPD_INSTALL_CONFIG
 	$(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/lighttpd/conf.d
 	$(INSTALL) -d -m 0755 $(TARGET_DIR)/var/www
+	$(INSTALL) -d -m 0755 $(TARGET_DIR)/var/log/lighttpd
 	$(INSTALL) -D -m 0644 $(@D)/doc/config/lighttpd.conf \
 		$(TARGET_DIR)/etc/lighttpd/lighttpd.conf
 	$(INSTALL) -D -m 0644 $(@D)/doc/config/modules.conf \
@@ -98,4 +99,8 @@ define LIGHTTPD_INSTALL_INIT_SYSTEMD
 		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/lighttpd.service
 endef

+define LIGHTTPD_PERMISSIONS
+	/var/log/lighttpd d 755 33 33 - - - - -
+endef
+
 $(eval $(autotools-package))
--
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-08-24  8:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-27 21:35 [Buildroot] [PATCH 1/1] lighttpd: Adding /var/log/lighttpd folder with the owner www-data The lighttpd need to write in his root log folder Laurent Hartanerot
2018-07-28  8:21 ` Arnout Vandecappelle
2018-07-30 10:24 ` [Buildroot] [PATCH v2 1/1] lighttpd: Add systemd tmpfile to fix lighttpd systemd boot Laurent Hartanerot
2018-08-14 14:28   ` Thomas Petazzoni
2018-08-24  8:30   ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox