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:
parent
d7979feb79
commit
0621ae479f
4 changed files with 6 additions and 8 deletions
|
@ -4,11 +4,11 @@ After=network.target
|
|||
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment=NODE_ENV=production
|
||||
Environment=NODE_CONFIG_DIR=__FINALPATH__/config
|
||||
User=__APP__
|
||||
Group=__APP__
|
||||
WorkingDirectory=__FINALPATH__/
|
||||
Environment=NODE_ENV=production
|
||||
Environment=NODE_CONFIG_DIR=__FINALPATH__/config
|
||||
Environment="__YNH_NODE_LOAD_PATH__"
|
||||
ExecStart=__YNH_NPM__ start
|
||||
StandardOutput=syslog
|
||||
|
|
|
@ -210,8 +210,6 @@ fi
|
|||
# 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"
|
||||
chown -R $app:$app $final_path/dist $final_path/global $final_path/config
|
||||
|
||||
|
|
|
@ -58,8 +58,10 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
|
|||
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
|
||||
# Restore permissions on app files (let dato write right only to what it needs to modify)
|
||||
chown -R root: $final_path
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
[ -d "$final_path/dist" ] || mkdir "$final_path/dist"
|
||||
chown -R $app:$app $final_path/dist $final_path/global $final_path/config
|
||||
|
||||
|
|
|
@ -132,8 +132,6 @@ popd
|
|||
# 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"
|
||||
chown -R $app:$app $final_path/dist $final_path/global $final_path/config
|
||||
|
||||
|
|
Loading…
Reference in a new issue