From 07a8de2b7e38d3eaab1d2b2f18d115be7f99a69c Mon Sep 17 00:00:00 2001 From: EricClaeys <83164203+EricClaeys@users.noreply.github.com> Date: Tue, 10 May 2022 23:30:30 -0500 Subject: [PATCH 1/3] install.sh: don't assume login is called "pi" At least one user had this problem --- website/install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/install.sh b/website/install.sh index 730137f51..1685b0c7a 100755 --- a/website/install.sh +++ b/website/install.sh @@ -153,7 +153,8 @@ if [ ! -d startrails/thumbnails -o ! -d keograms/thumbnails -o ! -d videos/thumb echo echo -e "${GREEN}* Fixing ownership and permissions${NC}" - chown -R pi:www-data . + U=${id --name --user) + chown -R "${U}:www-data" . find ./ -type f -exec chmod 644 {} \; find ./ -type d -exec chmod 775 {} \; echo From 903f344d6b9a182b6faf51651d8627ac8f7a8dd5 Mon Sep 17 00:00:00 2001 From: EricClaeys <83164203+EricClaeys@users.noreply.github.com> Date: Tue, 10 May 2022 23:40:50 -0500 Subject: [PATCH 2/3] install.sh: changed incorrect { to ( --- website/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/install.sh b/website/install.sh index 1685b0c7a..f5c1e977e 100755 --- a/website/install.sh +++ b/website/install.sh @@ -153,7 +153,7 @@ if [ ! -d startrails/thumbnails -o ! -d keograms/thumbnails -o ! -d videos/thumb echo echo -e "${GREEN}* Fixing ownership and permissions${NC}" - U=${id --name --user) + U=$(id --name --user) chown -R "${U}:www-data" . find ./ -type f -exec chmod 644 {} \; find ./ -type d -exec chmod 775 {} \; From 1e9011e9c948b98e2f29e9e4e0b2249c9ec8e1b5 Mon Sep 17 00:00:00 2001 From: EricClaeys <83164203+EricClaeys@users.noreply.github.com> Date: Thu, 12 May 2022 23:13:42 -0500 Subject: [PATCH 3/3] install.sh: use "-n -u" instead of "--name --user" --- website/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/install.sh b/website/install.sh index f5c1e977e..1b90766e4 100755 --- a/website/install.sh +++ b/website/install.sh @@ -153,7 +153,7 @@ if [ ! -d startrails/thumbnails -o ! -d keograms/thumbnails -o ! -d videos/thumb echo echo -e "${GREEN}* Fixing ownership and permissions${NC}" - U=$(id --name --user) + U=$(id -n -u) chown -R "${U}:www-data" . find ./ -type f -exec chmod 644 {} \; find ./ -type d -exec chmod 775 {} \;