From ad284df866bb6aa47cfd0fe5284ebdd0fb8336c1 Mon Sep 17 00:00:00 2001 From: EricClaeys <83164203+EricClaeys@users.noreply.github.com> Date: Thu, 11 Nov 2021 19:15:54 -0600 Subject: [PATCH 1/3] gui/install.sh: add www-data to "sudo" group so it can execute the vcgencmd command (new "show throttling" view on the "System" page). --- gui/install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gui/install.sh b/gui/install.sh index b2706905b..6d9a4a850 100755 --- a/gui/install.sh +++ b/gui/install.sh @@ -97,6 +97,8 @@ echo -e "${GREEN}* Adding the right permissions to the web server${NC}" # Remove any old entries; we now use /etc/sudoers.d/allsky instead of /etc/sudoers. sed -i -e '/allsky/d' -e '/www-data/d' /etc/sudoers cp $SCRIPTPATH/sudoers /etc/sudoers.d/allsky +# www-data needs to be in the "sudo" group for sudo to work. +sudo usermod -a -G sudo www-data echo # As of October 2021, WEBSITE_DIR is a subdirectory of PORTAL_DIR. From 97f4cee3de915cfabed8987a0261d8457adbbc13 Mon Sep 17 00:00:00 2001 From: EricClaeys <83164203+EricClaeys@users.noreply.github.com> Date: Thu, 11 Nov 2021 22:57:26 -0600 Subject: [PATCH 2/3] Add vcgencmd --- gui/sudoers | 1 + 1 file changed, 1 insertion(+) diff --git a/gui/sudoers b/gui/sudoers index 2672dc326..961521aae 100644 --- a/gui/sudoers +++ b/gui/sudoers @@ -23,3 +23,4 @@ www-data ALL=(ALL) NOPASSWD:/bin/chmod www-data ALL=(ALL) NOPASSWD:/bin/rm www-data ALL=(ALL) NOPASSWD:/bin/cp www-data ALL=(ALL) NOPASSWD:/bin/mv +www-data ALL=(ALL) NOPASSWD:/opt/vc/bin/vcgencmd From 1e0fa5192a45ecd92159c492299fd368e6630e54 Mon Sep 17 00:00:00 2001 From: EricClaeys <83164203+EricClaeys@users.noreply.github.com> Date: Thu, 11 Nov 2021 22:59:45 -0600 Subject: [PATCH 3/3] undo adding www-data to "sudo" group --- gui/install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/gui/install.sh b/gui/install.sh index 6d9a4a850..b2706905b 100755 --- a/gui/install.sh +++ b/gui/install.sh @@ -97,8 +97,6 @@ echo -e "${GREEN}* Adding the right permissions to the web server${NC}" # Remove any old entries; we now use /etc/sudoers.d/allsky instead of /etc/sudoers. sed -i -e '/allsky/d' -e '/www-data/d' /etc/sudoers cp $SCRIPTPATH/sudoers /etc/sudoers.d/allsky -# www-data needs to be in the "sudo" group for sudo to work. -sudo usermod -a -G sudo www-data echo # As of October 2021, WEBSITE_DIR is a subdirectory of PORTAL_DIR.