diff --git a/scripts/install b/scripts/install index 9bfd70d..172f4b6 100644 --- a/scripts/install +++ b/scripts/install @@ -61,7 +61,7 @@ ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name ynh_script_progression --message="Configuring system user..." --weight=2 # Create a system user -ynh_system_user_create --username=$app +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -112,6 +112,7 @@ ynh_store_file_checksum --file="$final_path/settings.php" # Set permissions to app files chown -R root: $final_path +chmod o-rwx $final_path chown -R $app:www-data $final_path/files chmod -R 770 $final_path/files diff --git a/scripts/restore b/scripts/restore index 1bcabba..83cd632 100644 --- a/scripts/restore +++ b/scripts/restore @@ -52,7 +52,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_script_progression --message="Recreating the dedicated system user..." --weight=3 # Create the dedicated user (if not existing) -ynh_system_user_create --username=$app +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # RESTORE THE APP MAIN DIR @@ -67,6 +67,7 @@ ynh_restore_file --origin_path="$final_path" # Set permissions to app files chown -R root: $final_path +chmod o-rwx $final_path chown -R $app:www-data $final_path/files chmod -R 770 $final_path/files diff --git a/scripts/upgrade b/scripts/upgrade index 883004c..5fdece7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -73,7 +73,7 @@ ynh_abort_if_errors ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 # Create a dedicated user (if not existing) -ynh_system_user_create --username=$app +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # STANDARD UPGRADE STEPS @@ -141,6 +141,7 @@ fi # Set permissions to app files chown -R root: $final_path +chmod o-rwx $final_path chown -R $app:www-data $final_path/files chmod -R 770 $final_path/files