1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/garradin_ynh.git synced 2024-09-03 18:36:17 +02:00

order to set permissions and user app

This commit is contained in:
Robles Rodolphe 2021-05-10 17:56:22 +02:00
parent a8ff621f3b
commit 428ab977c2

View file

@ -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
#=================================================