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:
parent
768acccb1b
commit
9b8c509b8d
3 changed files with 12 additions and 10 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue