From 99e47b6355b708e73036eecc5ec58a81a527d976 Mon Sep 17 00:00:00 2001 From: Keith Irwin Date: Sat, 10 Sep 2022 11:43:14 -0600 Subject: [PATCH] Fixed visudo? --- back/lib/ssl_peer_add | 4 +++- back/srv/dashboard/Dockerfile | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/back/lib/ssl_peer_add b/back/lib/ssl_peer_add index d4c3d30..3622d36 100755 --- a/back/lib/ssl_peer_add +++ b/back/lib/ssl_peer_add @@ -37,7 +37,9 @@ ipstring="${3}" printf 'Signing SSL certs for %s.%s.%s...\n' "${hostname}" "${username}" "${TLD}" >>"${LOGFILE}" # Make a directory for the new files -which mkdir >>"${LOGFILE}" +which rm >>"${LOGFILE}" +which sudo >>"${LOGFILE}" +which chmod >>"${LOGFILE}" if ! sudo mkdir "${SSL_CONFIG_DIR:?}/${username:?}/${hostname:?}/" >>"${LOGFILE}" 2>/dev/null; then printf 'Failed to create directory %s/%s/%s/\n' "${SSL_CONFIG_DIR}" "${username}" "${hostname}" >>"${LOGFILE}" exit 7 diff --git a/back/srv/dashboard/Dockerfile b/back/srv/dashboard/Dockerfile index 2fd1cf2..3f3b7b5 100644 --- a/back/srv/dashboard/Dockerfile +++ b/back/srv/dashboard/Dockerfile @@ -21,7 +21,7 @@ RUN sed -i "s|DocumentRoot .*$|DocumentRoot /var/www/cgi-bin\n\tScriptAlias / /v /etc/apache2/sites-available/000-default.conf # Allow http to run these binaries as root with sudo -RUN echo "www-data ALL=(ALL:ALL) NOPASSWD: /usr/bin/wg, /usr/bin/openssl, /usr/bin/mkdir, /usr/bin/rm, /usr/bin/chmod" \ +RUN echo "www-data ALL=(ALL:ALL) NOPASSWD: /usr/bin/wg, /usr/bin/openssl, /bin/mkdir, /usr/bin/rm, /usr/bin/chmod" \ | sudo EDITOR='tee -a' visudo # Prepare filesystem