-
Notifications
You must be signed in to change notification settings - Fork 3.1k
/tmp/pip-build can't be shared by several linux users #729
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
Comments
I found a workaround:
|
Just got bit by this as well. The workaround is fine, but the mode for /tmp/pip-build really should inherit /tmp's permissions. |
I use "export TMPDIR=$HOME/tmp" in my environment now. But fixing this would be nice. |
@chrismatta please explain which permissions from /tmp should be inherited. I don't think the sticky bit from /tmp should be used for the pip-build. |
@guiettli I guess it has to do with one's philosophy of what /tmp is for. Traditionally on linux /tmp has been scratch space where anyone can read and write to, so I don't see why making pip-build 0777 would be an issue. We ran into this recently after multiple users were tyring to install modules into thier pythonbrew environmetns, which doesn't seem to set $TMPDIR, so pip uses the /tmp dir. |
If you can inject code from one user to the next it is a big security problem. But somehow nobody seems to care. |
@chrismatta as @guettli has mentioned out this would introduce a security flaw. What functionality would be provided by letting other users read and write to a given user's temporary pip-build directory (other than introducing a security flaw) ? |
So why use /tmp at all? Or maybe pip should use /tmp/pip-build-uid for each user. This is probably more a pythonbrew issue than a pip issue in reality. |
@chrismatta that is what this pull request does: os.path.join(tempfile.gettempdir(), 'pip-build-%s' % getpass.getuser()) |
addressed in pull #780 |
A second bug related to the fixed temporary directory /tmp/pip-build.
This does not work if several linux-users use pip.
First user was modwork_egs_d and now the second user modwork_vums_dt tries to use pip:
Related: #725
The text was updated successfully, but these errors were encountered: