Skip to content
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

contrib.files.upload_template should pass along temp_dir to put #932

Closed
wants to merge 2 commits into from

Conversation

@nburlett
Copy link

@nburlett nburlett commented Jul 11, 2013

In e7e9649, a temp_dir kwarg was added to fabric.operations.put. Since
fabric.contrib.files.upload_template makes use of fabric.operations.put,
it makes sense to add a temp_dir kwarg to upload_template and pass it
along to put.

nburlett added 2 commits Jul 11, 2013
In e7e9649, a temp_dir kwarg was added to fabric.operations.put. Since
fabric.contrib.files.upload_template makes use of fabric.operations.put,
it makes sense to add a temp_dir kwarg to upload_template and pass it
along to put.
@Andor
Copy link

@Andor Andor commented Jan 19, 2015

Please, apply this merge request!

@wbashir
Copy link

@wbashir wbashir commented Jan 21, 2015

+1 Please this hurts. @bitprophet is there any workarounds at the moment ?

@elgow
Copy link

@elgow elgow commented Jan 25, 2016

This patch would offer at least a partial work-around to the design problem with put() when the sudo_user is not root. I hope you will merge it soon.

The design for put() with sudo is fundamentally unsound for the general case. The problem is that the file gets transferred by sftp as the logged in user, but it's moved into its final place by the sudo_user. Unless the both the logged in user and the sudo_user have proper permissions on the temp directory and the file, the operation will fail at some point. Probably what's necessary is to perform all remote operations as root and then chown the uploaded file to the sudo_user as the last step.

@bitprophet bitprophet closed this in 1f20939 Apr 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.