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

Fixed permissions for dato directory.

This commit is contained in:
squeak 2021-03-31 13:51:58 +02:00
parent 768acccb1b
commit 9b8c509b8d
3 changed files with 12 additions and 10 deletions

View file

@ -204,12 +204,10 @@ fi
# SECURE FILES AND DIRECTORIES
#=================================================
### For security reason, any app should set the permissions to root: before anything else.
### Then, if write authorization is needed, any access should be given only to directories
### that really need such authorization.
# Set permissions to app files
chown -R "$app":"$app" $final_path
# Set permissions to app files (let dato write right only to what it needs to modify)
chown -R root: $final_path
[ -d "$final_path/dist" ] || mkdir "$final_path/dist"
chown -R $app:$app $final_path/dist $final_path/global $final_path/config
#=================================================
# SETUP LOGROTATE

View file

@ -71,8 +71,10 @@ ynh_system_user_create --username=$app
# RESTORE USER RIGHTS
#=================================================
# Restore permissions on app files
chown -R "$app":"$app" $final_path
# Restore permissions on app files (let dato write right only to what it needs to modify)
chown -R root: $final_path
[ -d "$final_path/dist" ] || mkdir "$final_path/dist"
chown -R $app:$app $final_path/dist $final_path/global $final_path/config
# #=================================================
# # RESTORE FAIL2BAN CONFIGURATION

View file

@ -135,8 +135,10 @@ ynh_add_systemd_config --others_var="ynh_node_load_PATH"
# SECURE FILES AND DIRECTORIES
#=================================================
# Set permissions on app files
chown -R "$app":"$app" $final_path
# Set permissions on app files (let dato write right only to what it needs to modify)
chown -R root: $final_path
[ -d "$final_path/dist" ] || mkdir "$final_path/dist"
chown -R $app:$app $final_path/dist $final_path/global $final_path/config
#=================================================
# SETUP LOGROTATE