diff --git a/scripts/install b/scripts/install index 721cd36..8383f93 100755 --- a/scripts/install +++ b/scripts/install @@ -93,8 +93,6 @@ ynh_system_user_create --username=$app --home_dir=$final_path #================================================= ynh_script_progression --message="Installing Node-RED..." --weight=2 -chown -R $app: $final_path - ynh_use_nodejs pushd $final_path @@ -133,8 +131,9 @@ ynh_add_systemd_config #================================================= # Set permissions to app files -chown -R root:root $final_path -chown -R $app: $final_path/data +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app: "$final_path" #================================================= # SETUP LOGROTATE diff --git a/scripts/restore b/scripts/restore index ed58c5f..0aab515 100755 --- a/scripts/restore +++ b/scripts/restore @@ -65,7 +65,9 @@ ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # Restore permissions on app files -chown -R $app: $final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app: "$final_path" # Create log directory and apply permissions mkdir -p /var/log/$app diff --git a/scripts/upgrade b/scripts/upgrade index cabaacb..cc09f9a 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -125,9 +125,6 @@ ynh_system_user_create --username=$app --home_dir=$final_path #================================================= ynh_script_progression --message="Installing Node-RED..." --weight=30 -chown -R root:root $final_path -chown -R $app: $final_path/data - ynh_use_nodejs pushd $final_path @@ -173,7 +170,9 @@ ynh_add_systemd_config #================================================= # Set permissions on app files -chown -R $app: $final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app: "$final_path" #================================================= # ADVERTISE SERVICE IN ADMIN PANEL