Fix file permissions

This commit is contained in:
JensDiemer 2021-10-10 12:14:54 +02:00
parent 131346524e
commit d922d27119
3 changed files with 11 additions and 11 deletions

View file

@ -105,7 +105,7 @@ ynh_script_progression --message="Install project via pip..." --weight=80
python3 -m venv "${final_path}/venv"
cp ../conf/requirements.txt "$final_path/requirements.txt"
chown -R "$app" "$final_path"
chown -R "$app:" "$final_path"
#run source in a 'sub shell'
(
@ -204,9 +204,9 @@ 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" "$final_path"
chown -R "$app:" "$log_path"
chown -R "$app:" "$public_path"
chown -R "$app:" "$final_path"
#=================================================
# SETUP SYSTEMD

View file

@ -70,8 +70,8 @@ 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" "$final_path"
chown -R "$app:" "$public_path"
chown -R "$app:" "$final_path"
#=================================================
# SPECIFIC RESTORATION
@ -112,7 +112,7 @@ yunohost service add $app --description="Web based management to catalog things"
mkdir -p "$log_path"
touch "${log_file}"
chown -R "$app" "$log_path"
chown -R "$app:" "$log_path"
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
#=================================================

View file

@ -89,7 +89,7 @@ ynh_script_progression --message="Upgrade project via pip..." --weight=80
python3 -m venv "${final_path}/venv"
cp ../conf/requirements.txt "$final_path/requirements.txt"
chown -R "$app" "$final_path"
chown -R "$app:" "$final_path"
#run source in a 'sub shell'
(
@ -196,9 +196,9 @@ 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" "$final_path"
chown -R "$app:" "$log_path"
chown -R "$app:" "$public_path"
chown -R "$app:" "$final_path"
#=================================================
# Start django_example_ynh via systemd