Bugfix file permissions

This commit is contained in:
JensDiemer 2022-01-19 09:11:23 +01:00
parent f9fd753e4b
commit f19aa753c1
3 changed files with 26 additions and 3 deletions

View file

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

View file

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

View file

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