From 21c82b28c8b3595c62e0159d9f24900c369334c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 11 Dec 2023 14:17:36 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20permissions=C2=A0:=20venv=20should=20be?= =?UTF-8?q?=20generated=20as=20app,=20not=20root?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/_common.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 244e91a..8f1b84e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -42,11 +42,11 @@ myynh_setup_python_venv() { # Always recreate everything fresh with current python version ynh_secure_remove "$data_dir/venv" - # Skip pip because of: https://github.com/YunoHost/issues/issues/1960 - python3 -m venv --without-pip "$data_dir/venv" - chown -c -R "$app:" "$data_dir" + # Skip pip because of: https://github.com/YunoHost/issues/issues/1960 + ynh_exec_as $app python3 -m venv --without-pip "$data_dir/venv" + # run source in a 'sub shell' ( set +o nounset @@ -126,4 +126,3 @@ ynh_redis_remove_db() { local db=$1 redis-cli -n "$db" flushall } -