Fix permissions : venv should be generated as app, not root

This commit is contained in:
Salamandar 2023-12-11 14:17:36 +01:00 committed by Salamandar
parent 3f9daaf844
commit 21c82b28c8

View file

@ -42,11 +42,11 @@ myynh_setup_python_venv() {
# Always recreate everything fresh with current python version # Always recreate everything fresh with current python version
ynh_secure_remove "$data_dir/venv" 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" 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' # run source in a 'sub shell'
( (
set +o nounset set +o nounset
@ -126,4 +126,3 @@ ynh_redis_remove_db() {
local db=$1 local db=$1
redis-cli -n "$db" flushall redis-cli -n "$db" flushall
} }