mirror of
https://github.com/YunoHost-Apps/django-for-runners_ynh.git
synced 2024-09-03 18:26:16 +02:00
Bugfix file permissions in install/upgrade/restore
This commit is contained in:
parent
a07e23020b
commit
33bad5cb9f
3 changed files with 26 additions and 3 deletions
|
@ -217,9 +217,13 @@ yunohost service add $app --description="Web based management to catalog things"
|
||||||
|
|
||||||
# Set permissions to app files
|
# Set permissions to app files
|
||||||
chown -R "$app:" "$log_path"
|
chown -R "$app:" "$log_path"
|
||||||
chown -R "$app:" "$public_path"
|
chown -R "$app:www-data" "$public_path"
|
||||||
chown -R "$app:" "$final_path"
|
chown -R "$app:" "$final_path"
|
||||||
|
|
||||||
|
chmod o-rwx "$log_path"
|
||||||
|
chmod o-rwx "$public_path"
|
||||||
|
chmod o-rwx "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SYSTEMD
|
# SETUP SYSTEMD
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -70,7 +70,7 @@ ynh_system_user_create --username=$app --home_dir="$final_path" --use_shell
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Restore permissions on app files
|
# Restore permissions on app files
|
||||||
chown -R "$app:" "$public_path"
|
chown -R "$app:www-data" "$public_path"
|
||||||
chown -R "$app:" "$final_path"
|
chown -R "$app:" "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -144,6 +144,21 @@ touch "${log_file}"
|
||||||
chown -R "$app:" "$log_path"
|
chown -R "$app:" "$log_path"
|
||||||
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# GENERIC FINALIZATION
|
||||||
|
#=================================================
|
||||||
|
# SECURE FILES AND DIRECTORIES
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# Set permissions to app files
|
||||||
|
chown -R "$app:" "$log_path"
|
||||||
|
chown -R "$app:www-data" "$public_path"
|
||||||
|
chown -R "$app:" "$final_path"
|
||||||
|
|
||||||
|
chmod o-rwx "$log_path"
|
||||||
|
chmod o-rwx "$public_path"
|
||||||
|
chmod o-rwx "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -212,9 +212,13 @@ yunohost service add $app --description="Web based management to catalog things"
|
||||||
|
|
||||||
# Set permissions to app files
|
# Set permissions to app files
|
||||||
chown -R "$app:" "$log_path"
|
chown -R "$app:" "$log_path"
|
||||||
chown -R "$app:" "$public_path"
|
chown -R "$app:www-data" "$public_path"
|
||||||
chown -R "$app:" "$final_path"
|
chown -R "$app:" "$final_path"
|
||||||
|
|
||||||
|
chmod o-rwx "$log_path"
|
||||||
|
chmod o-rwx "$public_path"
|
||||||
|
chmod o-rwx "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# Start for_runners via systemd
|
# Start for_runners via systemd
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue