1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pyinventory_ynh.git synced 2024-09-03 20:16:09 +02:00

Merge pull request #70 from YunoHost-Apps/fix#65

Fix file permissions
This commit is contained in:
Jens Diemer 2021-10-10 12:29:40 +02:00 committed by GitHub
commit 55f9220449
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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
@ -129,7 +129,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 --upgrade "${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 pyinventory via systemd