From 8736fe6ae409f385317c7573e5be04209eeb586f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 9 Aug 2021 16:05:17 +0200 Subject: [PATCH] Fix --- scripts/install | 6 ++---- scripts/restore | 6 ++---- scripts/upgrade | 5 +---- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/scripts/install b/scripts/install index 4603c09..3ad8dea 100755 --- a/scripts/install +++ b/scripts/install @@ -98,8 +98,7 @@ cp -a ../sources/patches_last_version/* ../sources/patches # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" -find $final_path/ -type f -print0 | xargs -0 chmod 0644 -find $final_path/ -type d -print0 | xargs -0 chmod 0755 +chmod 755 "$final_path" chmod -R o-rwx "$final_path" chown -R $app: "$final_path" @@ -140,9 +139,8 @@ ynh_add_nginx_config datadir="/home/yunohost.app/$app/data" # Create app folders mkdir -p "$datadir" +chmod 755 "$datadir" chown -R $app: "$datadir" -find $datadir/ -type f -print0 | xargs -0 chmod 0640 -find $datadir/ -type d -print0 | xargs -0 chmod 0750 #================================================= # INSTALL NEXTCLOUD diff --git a/scripts/restore b/scripts/restore index 4469b2d..5cb5b45 100755 --- a/scripts/restore +++ b/scripts/restore @@ -74,8 +74,7 @@ ynh_script_progression --message="Restoring the app main directory..." ynh_restore_file --origin_path="$final_path" -find $final_path/ -type f -print0 | xargs -0 chmod 0644 -find $final_path/ -type d -print0 | xargs -0 chmod 0755 +chmod 755 "$final_path" chmod -R o-rwx "$final_path" chown -R $app: "$final_path" @@ -133,8 +132,7 @@ ynh_restore_file --origin_path="$datadir" --not_mandatory mkdir -p "$datadir" -find $datadir/ -type f -print0 | xargs -0 chmod 0640 -find $datadir/ -type d -print0 | xargs -0 chmod 0750 +chmod 755 "$datadir" chown -R $app: "$datadir" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index fdef638..219f1c1 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -406,10 +406,7 @@ EOF ynh_store_file_checksum --file="${final_path}/config/config.php" fi -find $final_path/ -type f -print0 | xargs -0 chmod 0644 -find $final_path/ -type d -print0 | xargs -0 chmod 0755 -find $datadir/ -type f -print0 | xargs -0 chmod 0640 -find $datadir/ -type d -print0 | xargs -0 chmod 0750 +chmod 755 "$final_path" "$datadir" chmod -R o-rwx "$final_path" chown -R $app: "$final_path" "$datadir" chmod 640 "$final_path/config/config.php"