-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PermissionError: [Errno 13] Permission denied: '/tmp/tmpzrluurcb/bin/python3' #732
Comments
Thanks for the report! Summarizing to make sure my understanding is correct:
This is an eventuality we hadn't considered 🙂 -- did you manually configure your (We'll need to think about how/if we want to handle this -- there are myriad ways for users to trip up userspace programs with filesystem options.) |
Your understanding is correct. This happened on a Ubuntu VM image that was "improved" for security reasons. |
Thanks for confirming! Out of curiosity: where did that VM image come from, if you can say? (Also: could you check to see if |
I asked around about this, and TIL that
(many thanks to @jayofdoom for pointing this out!) Given that, I think Longer term, we could probably try a shortlist of temporary directories to find one that allows How does that sound @rdinoff? |
|
Forgot to mention: as a temporary workaround, |
See #732 Signed-off-by: William Woodruff <william@trailofbits.com>
Since the error here isn't from our own code, I think we should just fail gracefully (rather than raise an exception) and hint that the user should set |
SGTM! That's what #737 will end up doing, once I write a (mocked) test. |
* _virtual_env: handle PermissionError See #732 Signed-off-by: William Woodruff <william@trailofbits.com> * _virtual_env: move the PermissionError around Signed-off-by: William Woodruff <william@trailofbits.com> * docstring coverage, add test Signed-off-by: William Woodruff <william@trailofbits.com> * CHANGELOG: record changes Signed-off-by: William Woodruff <william@trailofbits.com> --------- Signed-off-by: William Woodruff <william@trailofbits.com>
We've included an improved error message for this in 2.7.1. Thank you again for reporting @rdinoff! |
fix looks good ....
|
* _virtual_env: handle PermissionError See pypa/pip-audit#732 Signed-off-by: William Woodruff <william@trailofbits.com> * _virtual_env: move the PermissionError around Signed-off-by: William Woodruff <william@trailofbits.com> * docstring coverage, add test Signed-off-by: William Woodruff <william@trailofbits.com> * CHANGELOG: record changes Signed-off-by: William Woodruff <william@trailofbits.com> --------- Signed-off-by: William Woodruff <william@trailofbits.com>
* _virtual_env: handle PermissionError See pypa/pip-audit#732 Signed-off-by: William Woodruff <william@trailofbits.com> * _virtual_env: move the PermissionError around Signed-off-by: William Woodruff <william@trailofbits.com> * docstring coverage, add test Signed-off-by: William Woodruff <william@trailofbits.com> * CHANGELOG: record changes Signed-off-by: William Woodruff <william@trailofbits.com> --------- Signed-off-by: William Woodruff <william@trailofbits.com>
* _virtual_env: handle PermissionError See pypa/pip-audit#732 Signed-off-by: William Woodruff <william@trailofbits.com> * _virtual_env: move the PermissionError around Signed-off-by: William Woodruff <william@trailofbits.com> * docstring coverage, add test Signed-off-by: William Woodruff <william@trailofbits.com> * CHANGELOG: record changes Signed-off-by: William Woodruff <william@trailofbits.com> --------- Signed-off-by: William Woodruff <william@trailofbits.com>
Bug description
if /tmp/ is mounted with noexec you get the following stack trace.
Expected behavior
need an option to put tmp files in a different location
Platform information
pip-audit
version (pip-audit -V
): 2.7.0python -V
orpython3 -V
): 3.9.8pip
version (pip -V
orpip3 -V
): 24.0The text was updated successfully, but these errors were encountered: