diff --git a/scripts/install b/scripts/install index 0e30319..9b705b5 100755 --- a/scripts/install +++ b/scripts/install @@ -65,7 +65,9 @@ exec_occ() { # Set write access for the following commands find "$install_dir" -not \( -user $app -or -group www-data \) -exec chown $app:www-data {} \+ +chown $app:www-data "$install_dir" find "$data_dir" -not \( -user $app -or -group $app \) -exec chown $app: {} \+ +chown $app: "$data_dir" # Define password in an intermediate var # The fact that it's called _password allows it to be @@ -236,7 +238,9 @@ ynh_multimedia_addaccess $app # Fix app ownerships & permissions find "$install_dir" -not \( -user $app -or -group www-data \) -exec chown $app:www-data {} \+ +chown $app:www-data "$install_dir" find "$data_dir" -not \( -user $app -or -group $app \) -exec chown $app: {} \+ +chown $app: "$data_dir" find $install_dir/ -type f -print0 | xargs -r0 chmod 0644 find $install_dir/ -type d -print0 | xargs -r0 chmod 0755 find $data_dir/data/ -type f -print0 | xargs -r0 chmod 0640 diff --git a/scripts/restore b/scripts/restore index da7848e..5ef4f91 100755 --- a/scripts/restore +++ b/scripts/restore @@ -80,7 +80,9 @@ ynh_restore_file --origin_path="$data_dir" --not_mandatory # Fix app ownerships & permissions find "$install_dir" -not \( -user $app -or -group www-data \) -exec chown $app:www-data {} \+ +chown $app:www-data "$install_dir" find "$data_dir" -not \( -user $app -or -group $app \) -exec chown $app: {} \+ +chown $app: "$data_dir" find $install_dir/ -type f -print0 | xargs -r0 chmod 0644 find $install_dir/ -type d -print0 | xargs -r0 chmod 0755 find $data_dir/data/ -type f -print0 | xargs -r0 chmod 0640 diff --git a/scripts/upgrade b/scripts/upgrade index 5d70446..76d424b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -139,7 +139,9 @@ then # Set write access for the following commands find "$install_dir" -not \( -user $app -or -group www-data \) -exec chown $app:www-data {} \+ + chown $app:www-data "$install_dir" find "$data_dir" -not \( -user $app -or -group $app \) -exec chown $app: {} \+ + chown $app: "$data_dir" # Print the current version number of Nextcloud exec_occ -V @@ -209,7 +211,9 @@ then # Set write access for the following commands find "$install_dir" -not \( -user $app -or -group www-data \) -exec chown $app:www-data {} \+ + chown $app:www-data "$install_dir" find "$data_dir" -not \( -user $app -or -group $app \) -exec chown $app: {} \+ + chown $app: "$data_dir" # Upgrade Nextcloud (SUCCESS = 0, UP_TO_DATE = 3) exec_occ maintenance:mode --off @@ -327,7 +331,9 @@ ynh_script_progression --message="Reapplying file permissions..." --weight=2 # Fix app ownerships & permissions find "$install_dir" -not \( -user $app -or -group www-data \) -exec chown $app:www-data {} \+ +chown $app:www-data "$install_dir" find "$data_dir" -not \( -user $app -or -group $app \) -exec chown $app: {} \+ +chown $app: "$data_dir" find $install_dir/ -type f -print0 | xargs -r0 chmod 0644 find $install_dir/ -type d -print0 | xargs -r0 chmod 0755 find $data_dir/data/ -type f -print0 | xargs -r0 chmod 0640