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 #79 from YunoHost-Apps/fix-permissions

Fix file permissions
This commit is contained in:
Jens Diemer 2022-01-06 17:58:40 +01:00 committed by GitHub
commit 11a4dc6eae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 0 deletions

View file

@ -208,6 +208,10 @@ chown -R "$app:" "$log_path"
chown -R "$app:" "$public_path" chown -R "$app:" "$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
#================================================= #=================================================

View file

@ -132,6 +132,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:" "$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
#================================================= #=================================================

View file

@ -200,6 +200,10 @@ chown -R "$app:" "$log_path"
chown -R "$app:" "$public_path" chown -R "$app:" "$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 pyinventory via systemd # Start pyinventory via systemd
#================================================= #=================================================