From 2238345faeb298424d9182fb5ebf37da0046e6bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Dufraisse?= Date: Sat, 27 Nov 2021 12:48:13 +0100 Subject: [PATCH 1/7] feat(_commons): Create helper for ir rigthss --- scripts/_common.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/_common.sh b/scripts/_common.sh index 6aa5058..2ea1bc6 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -15,6 +15,19 @@ loginldap_version="2021-03-01-2" # PERSONAL HELPERS #================================================= +# update directory right +# | arg: app - The application's name ; default : yeswiki +# | arg: final_path - The path of the application's folder +# yeswiki_update_dir_rights yeswiki /var/www/yeswiki +yeswiki_update_dir_rights() { + local app="${1:-yeswiki}" + local final_path="${2}" + + chown -R $app:$app $final_path + chmod -R u=rwX,g=rwX,o-rwx $final_path + chmod -R o+rwX $final_path/{cache,files} +} + #================================================= # EXPERIMENTAL HELPERS #================================================= From eb81d36645c151d3c400592aa024f867148e63e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Dufraisse?= Date: Sat, 27 Nov 2021 12:51:17 +0100 Subject: [PATCH 2/7] fix(install): use yeswiki_update_dir_rights --- scripts/install | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index 5e37eda..bbfeab6 100755 --- a/scripts/install +++ b/scripts/install @@ -107,7 +107,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # Set right permissions for cURL install -chown -R $app: $final_path +chown -R $app:$app $final_path # Set the app as temporarily public for cURL call ynh_permission_update --permission="main" --add="visitors" @@ -165,11 +165,7 @@ ynh_replace_string --match_string=");"\ #================================================= # Set permissions to app files -chown -R root: $final_path -chown -R $app $final_path/{cache,files,themes,tools,wakka.config.php} - -chown $app:www-data $final_path -chmod o-rwx $final_path +yeswiki_update_dir_rights $app $final_path #================================================= # SETUP SSOWAT From faa49568f19efceeff1c7f47ee544c859dee347c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Dufraisse?= Date: Sat, 27 Nov 2021 12:52:07 +0100 Subject: [PATCH 3/7] fix(restore): use yeswiki_update_dir_rights --- scripts/restore | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/restore b/scripts/restore index be15d50..2b7a635 100755 --- a/scripts/restore +++ b/scripts/restore @@ -70,11 +70,7 @@ ynh_restore_file --origin_path="$final_path" #================================================= # Restore permissions on app files -chown -R root: $final_path -chown -R $app $final_path/{cache,files,themes,tools,wakka.config.php} - -chown $app:www-data $final_path -chmod o-rwx $final_path +yeswiki_update_dir_rights $app $final_path #================================================= # RESTORE THE PHP-FPM CONFIGURATION From 27b90b5dd5ca3a2e617278f02150c4708307573b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Dufraisse?= Date: Sat, 27 Nov 2021 12:52:59 +0100 Subject: [PATCH 4/7] fix(upgrade): yeswiki_update_dir_rights --- scripts/upgrade | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index f5c71c6..9ab3549 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -147,11 +147,7 @@ ynh_add_fpm_config --package="$extra_php_dependencies" #================================================= # Set permissions on app files -chown -R root: $final_path -chown -R $app $final_path/{cache,files,themes,tools,wakka.config.php} - -chown $app:www-data $final_path -chmod o-rwx $final_path +yeswiki_update_dir_rights $app $final_path #================================================= # RELOAD NGINX From f531ca4ade933782aadb989941788232e935656c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Dufraisse?= Date: Sat, 27 Nov 2021 13:15:34 +0100 Subject: [PATCH 5/7] fix(_common.sh) : better rigths after tests The idea is to be similar at what is done by update by yeswiki --- scripts/_common.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 2ea1bc6..9b3a305 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -24,8 +24,8 @@ yeswiki_update_dir_rights() { local final_path="${2}" chown -R $app:$app $final_path - chmod -R u=rwX,g=rwX,o-rwx $final_path - chmod -R o+rwX $final_path/{cache,files} + chmod -R u=rwX,g=rX,o=rW $final_path + chmod -R g+rwX,o+rwX $final_path/{cache,files} } #================================================= From bab8cb797be8f525fab23f2776e1a5b5f77018c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Dufraisse?= Date: Sat, 27 Nov 2021 13:16:47 +0100 Subject: [PATCH 6/7] fix(_common.sh): oups (online editing) --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 9b3a305..0eb7eca 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -24,7 +24,7 @@ yeswiki_update_dir_rights() { local final_path="${2}" chown -R $app:$app $final_path - chmod -R u=rwX,g=rX,o=rW $final_path + chmod -R u=rwX,g=rX,o=rX $final_path chmod -R g+rwX,o+rwX $final_path/{cache,files} } From 8a6f54a8a8710ad2bf180cb9d1158666f0cca6df Mon Sep 17 00:00:00 2001 From: Florian Date: Sun, 16 Jan 2022 22:31:45 +0300 Subject: [PATCH 7/7] 2022-01-16-13 latest version --- conf/app.src | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index b2342cc..e55d1c3 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://repository.yeswiki.net/doryphore/yeswiki-doryphore-2021-11-04-6.zip -SOURCE_SUM=f29d30506c0e69e7c0cb1a8f0b4a63bb798039bdf3c92ee93138c9bf8ea00754 +SOURCE_URL=https://repository.yeswiki.net/doryphore/yeswiki-doryphore-2022-01-16-13.zip +SOURCE_SUM=2239572babfbd46e8b79ac6333827c55225b2f70990d51e934e82fda8894165f SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=yeswiki-doryphore-2021-11-04-6.zip +SOURCE_FILENAME=yeswiki-doryphore-2022-01-16-13.zip