From 22cd0ae017c1390f9b09abf3ef995bff60deef0d Mon Sep 17 00:00:00 2001 From: billz Date: Wed, 1 Nov 2023 07:46:36 +0000 Subject: [PATCH] Add system/debuglog.sh to sudoers --- ajax/system/sys_debug.php | 2 +- installers/raspap.sudoers | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ajax/system/sys_debug.php b/ajax/system/sys_debug.php index e596ea1b..bb1fed31 100644 --- a/ajax/system/sys_debug.php +++ b/ajax/system/sys_debug.php @@ -8,7 +8,7 @@ if (isset($_POST['csrf_token'])) { handleInvalidCSRFToken(); } $root = getenv("DOCUMENT_ROOT"); - exec( RASPI_CONFIG.'/system/debuglog.sh -i '.$root, $return); + exec('sudo '.RASPI_CONFIG.'/system/debuglog.sh -i '.$root, $return); $logOutput = implode(PHP_EOL, $return); $tempDir = sys_get_temp_dir(); diff --git a/installers/raspap.sudoers b/installers/raspap.sudoers index 2e97f4fc..1b5cc806 100644 --- a/installers/raspap.sudoers +++ b/installers/raspap.sudoers @@ -41,6 +41,7 @@ www-data ALL=(ALL) NOPASSWD:/etc/raspap/hostapd/servicestart.sh www-data ALL=(ALL) NOPASSWD:/etc/raspap/lighttpd/configport.sh www-data ALL=(ALL) NOPASSWD:/etc/raspap/openvpn/configauth.sh www-data ALL=(ALL) NOPASSWD:/etc/raspap/openvpn/openvpnlog.sh +www-data ALL=(ALL) NOPASSWD:/etc/raspap/system/debuglog.sh www-data ALL=(ALL) NOPASSWD:/bin/chmod o+r /tmp/hostapd.log www-data ALL=(ALL) NOPASSWD:/bin/chmod o+r /var/log/dnsmasq.log www-data ALL=(ALL) NOPASSWD:/bin/chmod o+r /tmp/wireguard.log