diff --git a/scripts/install b/scripts/install
index 35ce788..2344f58 100755
--- a/scripts/install
+++ b/scripts/install
@@ -119,20 +119,19 @@ ynh_script_progression --message="Install weblate using PIP..." --weight=80
 ynh_psql_execute_as_root --sql="CREATE EXTENSION IF NOT EXISTS pg_trgm;" --database=$db_name
 
 virtualenv --python=python3 "${final_path}/venv"
-chown -R "$app": "$final_path"
 
 #run source in a 'sub shell'
 (
 	set +o nounset
 	source "${final_path}/venv/bin/activate"
 	set -o nounset
-	sudo -u $app $final_path/venv/bin/pip install --upgrade pip setuptools wheel
+	$final_path/venv/bin/pip install --upgrade pip setuptools wheel
 	# Still needed with latest version of weblate?
-	sudo -u $app $final_path/venv/bin/pip install Weblate=="$weblate_version"
-	sudo -u $app $final_path/venv/bin/pip install psycopg2-binary ruamel.yaml aeidon phply
+	$final_path/venv/bin/pip install Weblate=="$weblate_version"
+	$final_path/venv/bin/pip install psycopg2-binary ruamel.yaml aeidon phply
 	#pip install pytz python-bidi PyYaML Babel pyuca pylibravatar py3dns psycopg2-binary phply django-redis hiredis aeidon ruamel.yaml
 	# specific to YunoHost package:
-	sudo -u $app $final_path/venv/bin/pip install django_sendmail_backend
+	$final_path/venv/bin/pip install django_sendmail_backend
 )
 
 #=================================================
@@ -183,17 +182,17 @@ ynh_script_progression --message="Filling up the database..." --weight=10
 	set -o nounset
 	export DJANGO_SETTINGS_MODULE="weblate.settings"
 	# the user needs to be weblate for postgresql
-	sudo -u $app $final_path/venv/bin/weblate migrate --noinput
+	$final_path/venv/bin/weblate migrate --noinput
 	# generate static files
-	sudo -u $app $final_path/venv/bin/weblate collectstatic --noinput
-	sudo -u $app $final_path/venv/bin/weblate createadmin --no-color \
+	$final_path/venv/bin/weblate collectstatic --noinput
+	$final_path/venv/bin/weblate createadmin --no-color \
 		--password "$password" \
 		--username "$admin" \
 		--email "$admin_mail"
 
 	# Check the configuration
 	# This may fail in some cases with errors, etc., but the app works and the user can fix issues later.
-	sudo -u $app $final_path/venv/bin/weblate check --deploy || true
+	$final_path/venv/bin/weblate check --deploy || true
 )
 
 #=================================================
diff --git a/scripts/upgrade b/scripts/upgrade
index 47c30a6..53b522c 100755
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -171,20 +171,19 @@ upgrade() {
 	ynh_systemd_action --service_name="$app-celery" --action="stop"
 
 	virtualenv --python=python3 "${final_path}/venv"
-	chown -R "$app": "$final_path/venv"
 
 	#run source in a 'sub shell'
 	(
 		set +o nounset
 		source "${final_path}/venv/bin/activate"
 		set -o nounset
-		sudo -u $app $final_path/venv/bin/pip install --upgrade pip setuptools wheel
+		$final_path/venv/bin/pip install --upgrade pip setuptools wheel
 		# Still needed with latest version of weblate?
-		sudo -u $app $final_path/venv/bin/pip install --upgrade Weblate=="$new_version"
-		sudo -u $app $final_path/venv/bin/pip install psycopg2-binary ruamel.yaml aeidon phply
+		$final_path/venv/bin/pip install --upgrade Weblate=="$new_version"
+		$final_path/venv/bin/pip install psycopg2-binary ruamel.yaml aeidon phply
 		#pip install pytz python-bidi PyYaML Babel pyuca pylibravatar py3dns psycopg2-binary phply django-redis hiredis aeidon ruamel.yaml
 		# specific to YunoHost package:
-		sudo -u $app $final_path/venv/bin/pip install django_sendmail_backend
+		$final_path/venv/bin/pip install django_sendmail_backend
 	)
 
 	#=================================================
@@ -235,16 +234,16 @@ upgrade() {
 		export DJANGO_SETTINGS_MODULE="weblate.settings"
 		cd "${final_path}"
 
-		sudo -u $app $final_path/venv/bin/weblate migrate --noinput
-		sudo -u $app $final_path/venv/bin/weblate collectstatic --noinput
-		sudo -u $app $final_path/venv/bin/weblate setuplang
-		sudo -u $app $final_path/venv/bin/weblate setupgroups
-		sudo -u $app $final_path/venv/bin/weblate compilemessages
+		$final_path/venv/bin/weblate migrate --noinput
+		$final_path/venv/bin/weblate collectstatic --noinput
+		$final_path/venv/bin/weblate setuplang
+		$final_path/venv/bin/weblate setupgroups
+		$final_path/venv/bin/weblate compilemessages
 		
 		# Check the configuration
 		# This may fail in some cases with errors, etc., but the app works and the user can fix issues later.
 		if [ "$new_version" == "$weblate_version" ]; then
-			sudo -u $app $final_path/venv/bin/weblate check --deploy || true
+			$final_path/venv/bin/weblate check --deploy || true
 		fi
 	)
 }