Read a virtual environment owned by another operating-system user.
py.venv_python_versionpy.pip_listpy.pip_freezepy.pip_showpy.pip_checkpy.pip_outdatedpy.sys_pathpy.site_packages_dupy.pip_cache_info
Add the Emisar service user to the group that owns the venv
sudo usermod -aG "$(stat -c %G /opt/app/venv)" emisar sudo chmod -R g+rX /opt/app/venv sudo systemctl restart emisar
id -nG emisar | tr ' ' '\n' | grep -Fx "$(stat -c %G /opt/app/venv)" sudo -u emisar test -r /opt/app/venv/bin/python
Impact:
Every process running as emisar can read whatever the deployment group grants on this host, not only the virtual environment. It gets no write access and no other user's files. Substitute your own
PY_VENV
for
/opt/app/venv
, and note that an action declaring
execution.user
replaces these inherited supplementary groups.
Run the Emisar service as root (last resort)
sudo install -d -m 0755 /etc/systemd/system/emisar.service.d printf '%s\n' '[Service]' 'User=root' 'Group=root' | sudo tee /etc/systemd/system/emisar.service.d/10-python-app-host-access.conf >/dev/null sudo systemctl daemon-reload sudo systemctl restart emisar
test "$(systemctl show emisar --property=User --value)" = root
Impact: Every Emisar action on this runner executes as root and can read application code, installed packages, and any credentials stored beside the virtual environment. Reading a venv is a filesystem-permission problem, so take the group grant above unless the venv's owner genuinely cannot share a group.