mirror of
https://github.com/YunoHost-Apps/hotspot_ynh.git
synced 2024-09-03 19:25:53 +02:00
Fix weird permission stuff
This commit is contained in:
parent
588b915330
commit
7c1c6c8e15
3 changed files with 8 additions and 15 deletions
|
@ -218,9 +218,8 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
mkdir -pm 0755 $final_path
|
mkdir -pm 0755 $final_path
|
||||||
cp -a ../sources/* ${final_path}/
|
cp -a ../sources/* ${final_path}/
|
||||||
|
|
||||||
chmod -R 0644 ${final_path}/*
|
|
||||||
chmod 750 "$final_path"
|
chmod 750 "$final_path"
|
||||||
chmod -R o-rwx "$final_path"
|
chmod o-rwx "$final_path"
|
||||||
chown -R $app:www-data "$final_path"
|
chown -R $app:www-data "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -68,6 +68,12 @@ ynh_script_progression --message="Restoring the app main directory..."
|
||||||
|
|
||||||
ynh_restore_file --origin_path="$final_path"
|
ynh_restore_file --origin_path="$final_path"
|
||||||
|
|
||||||
|
# Restore permissions on app files
|
||||||
|
chmod 750 "$final_path"
|
||||||
|
chmod o-rwx "$final_path"
|
||||||
|
chown -R $app:www-data "$final_path"
|
||||||
|
|
||||||
|
|
||||||
if [[ $firmware_nonfree -eq 1 ]]; then
|
if [[ $firmware_nonfree -eq 1 ]]; then
|
||||||
check_armbian_nonfree_conflict
|
check_armbian_nonfree_conflict
|
||||||
ynh_install_extra_app_dependencies --repo="deb http://deb.debian.org/debian $(ynh_get_debian_release) non-free" --package="$nonfree_firmware_packages"
|
ynh_install_extra_app_dependencies --repo="deb http://deb.debian.org/debian $(ynh_get_debian_release) non-free" --package="$nonfree_firmware_packages"
|
||||||
|
@ -94,17 +100,6 @@ ynh_restore_file --origin_path="/usr/local/bin/$service_name"
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/init.d/hostapd"
|
ynh_restore_file --origin_path="/etc/init.d/hostapd"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RESTORE USER RIGHTS
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Restoring user rights..."
|
|
||||||
|
|
||||||
# Restore permissions on app files
|
|
||||||
chmod -R 0644 ${final_path}/*
|
|
||||||
chmod 750 "$final_path"
|
|
||||||
chmod -R o-rwx "$final_path"
|
|
||||||
chown -R $app:www-data "$final_path"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE PHP-FPM CONFIGURATION
|
# RESTORE THE PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -110,9 +110,8 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Restore permissions on app files
|
# Restore permissions on app files
|
||||||
chmod -R 0644 ${final_path}/*
|
|
||||||
chmod 750 "$final_path"
|
chmod 750 "$final_path"
|
||||||
chmod -R o-rwx "$final_path"
|
chmod o-rwx "$final_path"
|
||||||
chown -R $app:www-data "$final_path"
|
chown -R $app:www-data "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue