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

Fix chown

This commit is contained in:
yalh76 2022-07-29 20:02:48 +02:00
parent d7979feb79
commit 0621ae479f
4 changed files with 6 additions and 8 deletions

View file

@ -4,11 +4,11 @@ After=network.target
[Service] [Service]
Type=simple Type=simple
Environment=NODE_ENV=production
Environment=NODE_CONFIG_DIR=__FINALPATH__/config
User=__APP__ User=__APP__
Group=__APP__ Group=__APP__
WorkingDirectory=__FINALPATH__/ WorkingDirectory=__FINALPATH__/
Environment=NODE_ENV=production
Environment=NODE_CONFIG_DIR=__FINALPATH__/config
Environment="__YNH_NODE_LOAD_PATH__" Environment="__YNH_NODE_LOAD_PATH__"
ExecStart=__YNH_NPM__ start ExecStart=__YNH_NPM__ start
StandardOutput=syslog StandardOutput=syslog

View file

@ -210,8 +210,6 @@ fi
# SECURE FILES AND DIRECTORIES # SECURE FILES AND DIRECTORIES
#================================================= #=================================================
# 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" [ -d "$final_path/dist" ] || mkdir "$final_path/dist"
chown -R $app:$app $final_path/dist $final_path/global $final_path/config chown -R $app:$app $final_path/dist $final_path/global $final_path/config

View file

@ -58,8 +58,10 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
ynh_restore_file --origin_path="$final_path" ynh_restore_file --origin_path="$final_path"
# Restore permissions on app files (let dato write right only to what it needs to modify) chmod 750 "$final_path"
chown -R root: $final_path chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
[ -d "$final_path/dist" ] || mkdir "$final_path/dist" [ -d "$final_path/dist" ] || mkdir "$final_path/dist"
chown -R $app:$app $final_path/dist $final_path/global $final_path/config chown -R $app:$app $final_path/dist $final_path/global $final_path/config

View file

@ -132,8 +132,6 @@ popd
# SECURE FILES AND DIRECTORIES # SECURE FILES AND DIRECTORIES
#================================================= #=================================================
# 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" [ -d "$final_path/dist" ] || mkdir "$final_path/dist"
chown -R $app:$app $final_path/dist $final_path/global $final_path/config chown -R $app:$app $final_path/dist $final_path/global $final_path/config