diff --git a/scripts/install b/scripts/install index 2f7b40a..f2635e7 100755 --- a/scripts/install +++ b/scripts/install @@ -65,6 +65,7 @@ exec_occ() { # Set write access for the following commands chown -R $app:www-data "$install_dir" +chmod 600 "$install_dir/config/config.php" chown -R $app: "$data_dir" # Define password in an intermediate var @@ -241,7 +242,7 @@ 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 find $data_dir/data/ -type d -print0 | xargs -r0 chmod 0750 -chmod 640 "$install_dir/config/config.php" +chmod 600 "$install_dir/config/config.php" chmod 755 /home/yunohost.app chmod 750 $install_dir diff --git a/scripts/restore b/scripts/restore index 1b0f63c..9ae3611 100755 --- a/scripts/restore +++ b/scripts/restore @@ -85,7 +85,7 @@ 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 find $data_dir/data/ -type d -print0 | xargs -r0 chmod 0750 -chmod 640 "$install_dir/config/config.php" +chmod 600 "$install_dir/config/config.php" chmod 755 /home/yunohost.app chmod 750 $install_dir diff --git a/scripts/upgrade b/scripts/upgrade index 2a02150..846c1d9 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -139,6 +139,7 @@ then # Set write access for the following commands chown -R $app:www-data "$install_dir" + chmod 600 "$install_dir/config/config.php" # Print the current version number of Nextcloud exec_occ -V @@ -208,6 +209,7 @@ then # Set write access for the following commands chown -R $app:www-data "$install_dir" + chmod 600 "$install_dir/config/config.php" # Upgrade Nextcloud (SUCCESS = 0, UP_TO_DATE = 3) exec_occ maintenance:mode --off @@ -327,7 +329,7 @@ ynh_script_progression --message="Reapplying file permissions..." --weight=2 chown -R $app:www-data "$install_dir" find $install_dir/ -type f -print0 | xargs -r0 chmod 0644 find $install_dir/ -type d -print0 | xargs -r0 chmod 0755 -chmod 640 "$install_dir/config/config.php" +chmod 600 "$install_dir/config/config.php" chmod 755 /home/yunohost.app chmod 750 $install_dir