mirror of
https://github.com/YunoHost-Apps/django_example_ynh.git
synced 2024-09-03 18:26:21 +02:00
Bugfix file permissions
This commit is contained in:
parent
f9fd753e4b
commit
f19aa753c1
3 changed files with 26 additions and 3 deletions
|
@ -211,9 +211,13 @@ yunohost service add $app --description="Web based management to catalog things"
|
|||
|
||||
# Set permissions to app files
|
||||
chown -R "$app:" "$log_path"
|
||||
chown -R "$app:" "$public_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"
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
|
|
|
@ -70,7 +70,7 @@ ynh_system_user_create --username=$app --home_dir="$final_path" --use_shell
|
|||
#=================================================
|
||||
|
||||
# Restore permissions on app files
|
||||
chown -R "$app:" "$public_path"
|
||||
chown -R "$app:www-data" "$public_path"
|
||||
chown -R "$app:" "$final_path"
|
||||
|
||||
#=================================================
|
||||
|
@ -138,6 +138,21 @@ touch "${log_file}"
|
|||
chown -R "$app:" "$log_path"
|
||||
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
|
||||
#=================================================
|
||||
|
|
|
@ -203,9 +203,13 @@ yunohost service add $app --description="Web based management to catalog things"
|
|||
|
||||
# Set permissions to app files
|
||||
chown -R "$app:" "$log_path"
|
||||
chown -R "$app:" "$public_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"
|
||||
|
||||
#=================================================
|
||||
# Start django_example_ynh via systemd
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue