Summary
$ uv init /tmp/project
$ uv --project=/tmp/project add requests
$ echo 'import requests; print(requests.__version__)' > /tmp/project/main.py
$ mkdir /tmp/elsewhere
$ cd /tmp/elsewhere
$ uv run --preview-features=target-workspace-discovery /tmp/project/main.py
2.32.5
$ chmod 000 .
$ uv run --preview-features=target-workspace-discovery /tmp/project/main.py
error: failed to open file `/tmp/elsewhere/uv.toml`: Permission denied (os error 13)
This comes up when an administrator with cwd /root uses su to run a script as another user who can’t read /root. For example, a Zulip administrator expects to be able to run su zulip -c '/home/zulip/deployments/current/manage.py backup'.
(Rereported from #11302 (comment) with a more streamlined test case.)
Please merge this fix:
Platform
Linux amd64
Version
0.11.0
Python version
Python 3.14.3