radicale3: fix permissions on ssl cert/key

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 <dfdpublic@wildtechgarden.ca>
This commit is contained in:
Daniel F. Dickinson
2026-01-11 19:14:35 -05:00
committed by Hannu Nyman
parent 6b58aa69ca
commit ecf9fb51db
2 changed files with 14 additions and 0 deletions
+2
View 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
+12
View File
@@ -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