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

Fix rights

This commit is contained in:
yalh76 2022-07-28 20:26:29 +02:00
parent 38f2e8507c
commit e09e17d33d
3 changed files with 3 additions and 20 deletions

View file

@ -34,12 +34,10 @@ myynh_set_permissions () {
[ $(find "$final_path" -type d | wc -l) -gt 0 ] && find "$final_path" -type d | xargs chmod 0755
[ $(find "$datadir" -type f | wc -l) -gt 0 ] && find "$datadir" -type f | xargs chmod 0644
[ $(find "$datadir" -type d | wc -l) -gt 0 ] && find "$datadir" -type d | xargs chmod 0755
chown -R root:"$app" "$final_path"
chown -R "$app": "$final_path/private"
chown -R "$app": "$datadir"
chown root: "$datadir"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
chmod -R o-rwx "$datadir"
chown -R $app:www-data "$datadir"
}
#Convert --data to --data-urlencode before ynh_local_curl

View file

@ -83,10 +83,6 @@ ynh_setup_source --dest_dir="$tmpdir"
myynh_clean_source
mv "$tmpdir" "$final_path"
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
@ -117,10 +113,6 @@ ynh_app_setting_set --app=$app --key=datadir --value=$datadir
mkdir -p $datadir
chmod 750 "$datadir"
chmod -R o-rwx "$datadir"
chown -R $app:www-data "$datadir"
#=================================================
# ADD A CONFIGURATION
#=================================================

View file

@ -54,10 +54,6 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
ynh_restore_file --origin_path="$final_path"
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# RESTORE THE DATA DIRECTORY
#=================================================
@ -67,10 +63,6 @@ ynh_restore_file --origin_path="$datadir" --not_mandatory
mkdir -p $datadir
chmod 750 "$datadir"
chmod -R o-rwx "$datadir"
chown -R $app:www-data "$datadir"
#=================================================
# SPECIFIC RESTORATION
#=================================================
@ -98,6 +90,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RESTORE USER RIGHTS
#=================================================
myynh_set_permissions
#=================================================