From eef312d9cbc009c8ddc695cda9b5fa4f10457107 Mon Sep 17 00:00:00 2001 From: pvogt09 <50047961+pvogt09@users.noreply.github.com> Date: Mon, 23 Mar 2020 14:35:20 +0100 Subject: [PATCH] set permission for /var/cache if it did not exist before Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> --- automated install/basic-install.sh | 5 +++++ test/test_automated_install.py | 2 ++ 2 files changed, 7 insertions(+) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 797c0c76..3d943213 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1431,7 +1431,12 @@ installConfigs() { # Make the directories if they do not exist and set the owners mkdir -p /run/lighttpd chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /run/lighttpd + local varcache=$(test -d /var/cache; echo $?) mkdir -p /var/cache/lighttpd/compress + if [[ ! "${varcache}" -eq 0 ]]; then + chmod a+rx /var/cache + fi + chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/cache/lighttpd chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/cache/lighttpd/compress mkdir -p /var/cache/lighttpd/uploads chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/cache/lighttpd/uploads diff --git a/test/test_automated_install.py b/test/test_automated_install.py index a318c0f5..20c9b1b6 100644 --- a/test/test_automated_install.py +++ b/test/test_automated_install.py @@ -226,6 +226,8 @@ def test_installPihole_fresh_install_readableBlockpage(Pihole, test_webpage): setup_var_file = 'cat < /etc/pihole/setupVars.conf\n' for k, v in SETUPVARS.items(): setup_var_file += "{}={}\n".format(k, v) + setup_var_file += "INSTALL_WEB_SERVER=true\n" + setup_var_file += "INSTALL_WEB_INTERFACE=true\n" setup_var_file += "EOF\n" Pihole.run(setup_var_file) installWeb = Pihole.run('''