diff --git a/scripts/install b/scripts/install index e5deada..3f7dfc8 100755 --- a/scripts/install +++ b/scripts/install @@ -69,7 +69,7 @@ ynh_psql_setup_db --db_user=$db_name --db_name=$db_name ynh_script_progression --message="Configuring system user..." --weight=1 # 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 @@ -83,9 +83,9 @@ ynh_setup_source --dest_dir="$final_path" mv $final_path/galette/* $final_path/ ynh_secure_remove $final_path/tests -#chmod 750 $final_path -#chmod -R o-rwx $final_path -#chown -R $app:www-data $final_path +chmod 750 $final_path +chmod -R o-rwx $final_path +chown -R $app:www-data $final_path #================================================= # NGINX CONFIGURATION @@ -117,25 +117,15 @@ ynh_add_config --template="../conf/config.inc.php.dist" --destination="$final_pa # SECURE FILES AND DIRECTORIES #================================================= -# Set permissions -chown -R root:www-data $final_path -chmod -R o-rwx $final_path chmod u+rx $final_path/config chmod g+rwx $final_path/config for folder in attachments cache exports files imports logs photos templates_c tempimages do - chmod u+rx $final_path/data/$folder + chown $app $final_path/data/$folder chmod g+rwx $final_path/data/$folder done - -#for folder in attachments cache exports files imports logs photos templates_c tempimages -#do - # chown -R $app "$final_path/data/$folder" - # chmod -R 775 "$final_path/data/$folder" -#done - #================================================= # SETUP LOGROTATE #================================================= diff --git a/scripts/restore b/scripts/restore index d9fc78a..af51836 100644 --- a/scripts/restore +++ b/scripts/restore @@ -29,6 +29,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +timezone="$(cat /etc/timezone)" #================================================= # CHECK IF THE APP CAN BE RESTORED