diff --git a/scripts/install b/scripts/install index 3e28d64..373d743 100644 --- a/scripts/install +++ b/scripts/install @@ -103,10 +103,7 @@ final_path=/var/www/$app ynh_app_setting_set $app final_path $final_path ynh_setup_source $final_path -#================================================= -# Files owned by root, www-data can just read -#================================================= - +# Set files ownership during installation sudo chown $app: $final_path -R sudo chmod 755 $final_path -R @@ -116,12 +113,6 @@ sudo chmod 755 $final_path -R ynh_nginx_config -#================================================= -# NODEJS Version -#================================================= - -ynh_use_nodejs - #================================================= # ADD SYSTEMD SERVICE #================================================= @@ -152,6 +143,13 @@ sudo mv ../conf/config.js $final_path/config.js ynh_replace_string "__PORT__" "$port" "$final_path/config.js" ynh_replace_string "__URL__" "$domain$path_url" "$final_path/config.js" +#================================================= +# SET FILES OWNERSHIP +#================================================= + +chown -R root: $final_path +chown -R $app: $final_path/datastore + #================================================= # INSTALL MODULES FOR CRYPTPAD #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index d03b6c5..5d50a25 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -80,10 +80,7 @@ final_path=/var/www/$app ynh_app_setting_set $app final_path $final_path ynh_setup_source $final_path -#================================================= -# Files owned by root, www-data can just read -#================================================= - +# Set files ownership during installation sudo chown $app: $final_path -R sudo chmod 755 $final_path -R @@ -123,6 +120,13 @@ sudo mv ../conf/config.js $final_path/config.js ynh_replace_string "__URL__" "$path_url" "$final_path/config.js" ynh_replace_string "__PORT__" "$port" "$final_path/config.js" +#================================================= +# SET FILES OWNERSHIP +#================================================= + +chown -R root: $final_path +chown -R $app: $final_path/datastore + #================================================= # INSTALL MODULES FOR CRYPTPAD #=================================================