diff --git a/scripts/install b/scripts/install index 01e273a..6591840 100644 --- a/scripts/install +++ b/scripts/install @@ -81,23 +81,6 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=5 ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" #phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) -#================================================= -# Files owned by user app -#================================================= - -chown -R $app:$app $final_path -chmod 400 $final_path/config.dist.php $final_path/index.php $final_path/sous-domaine.html $final_path/VERSION -chmod 644 $final_path/config.local.php -find $final_path/scripts -type d -exec chmod 500 {} + -find $final_path/scripts -type f -exec chmod 400 {} + -find $final_path/templates -type d -exec chmod 500 {} + -find $final_path/templates -type f -exec chmod 400 {} + -find $final_path/include -type d -exec chmod 500 {} + -find $final_path/include -type f -exec chmod 400 {} + -find $final_path/data -type d -exec chmod 700 {} + -find $final_path/data -type f -exec chmod 600 {} + -find /var/www/garradin/www -type d -exec chmod 755 {} + -find /var/www/garradin/www -type f -exec chmod 644 {} + #================================================= # SETUP SSOWAT @@ -125,6 +108,24 @@ else ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url/';" --target_file="$final_path/config.local.php" fi +#================================================= +# Files owned by user app +#================================================= + +chown -R $app:$app $final_path +chmod 400 $final_path/config.dist.php $final_path/index.php $final_path/sous-domaine.html $final_path/VERSION +chmod 644 $final_path/config.local.php +find $final_path/scripts -type d -exec chmod 500 {} + +find $final_path/scripts -type f -exec chmod 400 {} + +find $final_path/templates -type d -exec chmod 500 {} + +find $final_path/templates -type f -exec chmod 400 {} + +find $final_path/include -type d -exec chmod 500 {} + +find $final_path/include -type f -exec chmod 400 {} + +find $final_path/data -type d -exec chmod 700 {} + +find $final_path/data -type f -exec chmod 600 {} + +find /var/www/garradin/www -type d -exec chmod 755 {} + +find /var/www/garradin/www -type f -exec chmod 644 {} + + #================================================= # RELOAD NGINX #=================================================