radicale3: fix permissions on ssl cert/key
authorDaniel F. Dickinson <redacted>
Mon, 12 Jan 2026 00:14:35 +0000 (19:14 -0500)
committerHannu Nyman <redacted>
Wed, 21 Jan 2026 05:42:10 +0000 (07:42 +0200)
When LuCI uploads files like the SSL key and certificate, it makes the
files readable only by root. Since radicale is running as a
non-privileged user it is unable to access a certificate and key
uploaded by LuCI, therefore when SSL cert and key (and optional CA) are
configured, make them group radicale3 and group readable, so the
radicale server can use them.

Signed-off-by: Daniel F. Dickinson <redacted>
net/radicale3/Makefile
net/radicale3/files/radicale3.init

index 7b4b2d81d25e642e17075f177d0acf3be7901770..8c1b66069200fad685ec62750ee251e00f8368f0 100644 (file)
@@ -18,6 +18,8 @@ PYPI_NAME:=Radicale
 PYPI_SOURCE_NAME:=radicale
 PKG_HASH:=569f2a8cf990faf9bb25b7442f36ddd439526b95db81d8878952d77836ab3d4c
 
+PKG_MAINTAINER:=Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
+
 include ../../lang/python/pypi.mk
 include $(INCLUDE_DIR)/package.mk
 include ../../lang/python/python3-package.mk
index 9a4c09320530a5ec4d97871a5e5c0dd17d077a52..d030160e5e5c0be7784ee66f63f9b5f048fdc3a6 100755 (executable)
@@ -72,8 +72,20 @@ conf_section() {
                conf_getline "$cfg" "$cfgfile" ssl 0 1
                if [ "$value" -eq 1 ]; then
                        conf_getline "$cfg" "$cfgfile" certificate
+                       if [ "$value" != "" ]; then
+                               chgrp radicale3 "$value"
+                               chmod g+r "$value"
+                       fi
                        conf_getline "$cfg" "$cfgfile" key
+                       if [ "$value" != "" ]; then
+                               chgrp radicale3 "$value"
+                               chmod g+r "$value"
+                       fi
                        conf_getline "$cfg" "$cfgfile" certificate_authority
+                       if [ "$value" != "" ]; then
+                               chgrp radicale3 "$value"
+                               chmod g+r "$value"
+                       fi
                        conf_getline "$cfg" "$cfgfile" protocol
                        conf_getline "$cfg" "$cfgfile" ciphers
                fi
git clone https://git.99rst.org/PROJECT