From 5eca1f76f0e009ae869010b2bee3f559b841b1f3 Mon Sep 17 00:00:00 2001 From: Andrea Pollastri <18210420+andreapollastri@users.noreply.github.com> Date: Sat, 18 Dec 2021 10:46:06 +0100 Subject: [PATCH 1/3] Fix --- storage/app/cipi/patch202112181.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/storage/app/cipi/patch202112181.sh b/storage/app/cipi/patch202112181.sh index 6349a0ff..32315e0a 100644 --- a/storage/app/cipi/patch202112181.sh +++ b/storage/app/cipi/patch202112181.sh @@ -1,3 +1,2 @@ # USER PERMISSIONS FIX -sudo cp /bin/bash /bin/rbash -sudo sed -i -e '/cp/s/bin\/bash/bin\/rbash/' /etc/passwd \ No newline at end of file +sudo chown www-data:cipi -R /var/www/html \ No newline at end of file From a101bf61d36044894fa239e1eb664018d6511695 Mon Sep 17 00:00:00 2001 From: Andrea Pollastri <18210420+andreapollastri@users.noreply.github.com> Date: Sat, 18 Dec 2021 10:48:27 +0100 Subject: [PATCH 2/3] Fix --- go.sh | 3 ++- storage/app/cipi/newsite.sh | 2 +- storage/app/cipi/setup.sh | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/go.sh b/go.sh index 51c5ddca..2efb8ce0 100644 --- a/go.sh +++ b/go.sh @@ -619,7 +619,8 @@ echo "${bggreen}${black}${bold}" echo "Last steps..." echo "${reset}" sleep 1s -sudo cp /bin/bash /bin/rbash + +sudo chown www-data:cipi -R /var/www/html sudo echo 'DefaultStartLimitIntervalSec=1s' >> /usr/lib/systemd/system/user@.service sudo echo 'DefaultStartLimitBurst=50' >> /usr/lib/systemd/system/user@.service sudo echo 'StartLimitBurst=0' >> /usr/lib/systemd/system/user@.service diff --git a/storage/app/cipi/newsite.sh b/storage/app/cipi/newsite.sh index 5310ba2c..a4fa5a39 100644 --- a/storage/app/cipi/newsite.sh +++ b/storage/app/cipi/newsite.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash BASE_PATH= -USER_SHELL=/bin/rbash +USER_SHELL=/bin/bash while [ -n "$1" ] ; do case $1 in diff --git a/storage/app/cipi/setup.sh b/storage/app/cipi/setup.sh index dffac88b..d80c3941 100644 --- a/storage/app/cipi/setup.sh +++ b/storage/app/cipi/setup.sh @@ -550,7 +550,7 @@ echo "Last steps..." echo "${reset}" sleep 1s -sudo cp /bin/bash /bin/rbash +sudo chown www-data:cipi -R /var/www/html sudo echo 'StartLimitBurst=0' >> /usr/lib/systemd/system/user@.service sudo systemctl daemon-reload From 00c841713d85fd7042582921fd8146d9ba8e0151 Mon Sep 17 00:00:00 2001 From: Andrea Pollastri <18210420+andreapollastri@users.noreply.github.com> Date: Sat, 18 Dec 2021 10:55:54 +0100 Subject: [PATCH 3/3] Fix --- go.sh | 1 + storage/app/cipi/patch202112181.sh | 3 ++- storage/app/cipi/setup.sh | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/go.sh b/go.sh index 2efb8ce0..ef2d5393 100644 --- a/go.sh +++ b/go.sh @@ -621,6 +621,7 @@ echo "${reset}" sleep 1s sudo chown www-data:cipi -R /var/www/html +sudo chmod -R 750 /var/www/html sudo echo 'DefaultStartLimitIntervalSec=1s' >> /usr/lib/systemd/system/user@.service sudo echo 'DefaultStartLimitBurst=50' >> /usr/lib/systemd/system/user@.service sudo echo 'StartLimitBurst=0' >> /usr/lib/systemd/system/user@.service diff --git a/storage/app/cipi/patch202112181.sh b/storage/app/cipi/patch202112181.sh index 32315e0a..30d2c901 100644 --- a/storage/app/cipi/patch202112181.sh +++ b/storage/app/cipi/patch202112181.sh @@ -1,2 +1,3 @@ # USER PERMISSIONS FIX -sudo chown www-data:cipi -R /var/www/html \ No newline at end of file +sudo chown www-data:cipi -R /var/www/html +sudo chmod -R 750 /var/www/html \ No newline at end of file diff --git a/storage/app/cipi/setup.sh b/storage/app/cipi/setup.sh index d80c3941..d462ced2 100644 --- a/storage/app/cipi/setup.sh +++ b/storage/app/cipi/setup.sh @@ -551,6 +551,7 @@ echo "${reset}" sleep 1s sudo chown www-data:cipi -R /var/www/html +sudo chmod -R 750 /var/www/html sudo echo 'StartLimitBurst=0' >> /usr/lib/systemd/system/user@.service sudo systemctl daemon-reload