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

Feature: get() with sudo #700

Closed
jaraco opened this issue Aug 3, 2012 · 25 comments
Closed

Feature: get() with sudo #700

jaraco opened this issue Aug 3, 2012 · 25 comments

Comments

@jaraco
Copy link

@jaraco jaraco commented Aug 3, 2012

It seems api.get() doesn't accept the use_sudo parameter like most other operations. It probably should. Not all files are world-readable.

@bitprophet
Copy link
Member

@bitprophet bitprophet commented Aug 3, 2012

This would require an inverse version of what's done now to support sudo-capable puts, aka roughly sudo cp /real/file/path /tmp/temp_file_name + SFTP get() call to that temp file name + sudo rm /tmp/temp_file_name.

I agree that it would be nice to have, though given I can't find any prior requests for it it's clearly not a huge deal for most users, so I doubt it'll float to the top of my personal list anytime soon.

However a well rounded pull request (meaning: follows the put implementation closely re: temp file names and handling edge cases; includes documentation + changelog updates; etc) might get merged :)

@nkeilar
Copy link

@nkeilar nkeilar commented Jun 2, 2013

+1

1 similar comment
@rhfung
Copy link

@rhfung rhfung commented Jun 18, 2013

+1

@dwagon
Copy link

@dwagon dwagon commented Jun 19, 2013

+1 but "sudo cat" would probably be a workaround

@hannes-ucsc
Copy link

@hannes-ucsc hannes-ucsc commented Aug 28, 2013

+1

@isegal
Copy link

@isegal isegal commented Sep 18, 2013

+1
this is very useful for system administration i.e. when you want to pull one of the /etc config file from multiple systems.

@nkeilar
Copy link

@nkeilar nkeilar commented Sep 18, 2013

my work around was to copy said file to /tmp then download it

On 18 September 2013 10:39, Ivgeni Segal notifications@github.com wrote:

+1
this is very useful for system administration i.e. when you want to pull
one of the /etc config file from multiple systems.


Reply to this email directly or view it on GitHubhttps://github.com//issues/700#issuecomment-24684126
.

Nathan Keilar
Hunted Hive Web Studio ~ Innovative Solutions For Real World Problems
Technical Director and Business Manager

EMAIL: nathank@huntedhive.com
PHONE: +61 (0) 7 3040 3065 (AUS)
SKYPE/TWITTER: HuntedHive / https://twitter.com/HuntedHive
FACEBOOK: https://www.facebook.com/HuntedHive
LINKEDIN: http://au.linkedin.com/in/nathankeilar
WEB: http://huntedhive.com

This email (including any attachments) is confidential and may be
privileged. If you have received it in error, please notify the sender by
return email and delete this message from your system. Any unauthorised use
or dissemination of this message in whole or in part is strictly
prohibited. Please note that emails are susceptible to change and we will
not be liable for the improper or incomplete transmission of the
information contained in this communication nor for any delay in its
receipt or damage to your system. We do not guarantee that the integrity of
this communication has been maintained nor that this communication is free
of viruses, interceptions or interference.

@isegal
Copy link

@isegal isegal commented Sep 18, 2013

I just use fab -u root -i rootKey.pem for now, essentially operating as root. A bit risky but it works for now.

@dwagon
Copy link

@dwagon dwagon commented Sep 19, 2013

I know there are workarounds; I use them currently. However it is still a feature that would make everyone's life easier in the future and also gives feature symmetry: everything you can do with a put() you should be able to do with a get()

@baconalot
Copy link

@baconalot baconalot commented Oct 28, 2013

+1
Please uniform all these operations. Maybe even drop the "sudo()" operation and let "run()" eat "as_sudo". This would make the api for these functions much more pythonesk and easy to use.
Now my code is cluttered with stuff like:

def foo(payload, as_sudo):
if as_sudo:
return sudo(payload)
else:
return run(payload)

@tshepang
Copy link

@tshepang tshepang commented Oct 28, 2013

@baconalot +1 on the consistency argument

@jberkus
Copy link

@jberkus jberkus commented Oct 29, 2013

I'm looking at adding a sudo user/group argument to put(), just FYI.

@MilOo
Copy link

@MilOo MilOo commented Dec 12, 2013

+1

6 similar comments
@willejs
Copy link

@willejs willejs commented Jan 8, 2014

+1

@wengole
Copy link

@wengole wengole commented Feb 4, 2014

+1

@marcesher
Copy link

@marcesher marcesher commented Feb 7, 2014

+1

@tonnydourado
Copy link

@tonnydourado tonnydourado commented Mar 13, 2014

+1

@adamcharnock
Copy link

@adamcharnock adamcharnock commented Mar 18, 2014

+1

@kimmobrunfeldt
Copy link

@kimmobrunfeldt kimmobrunfeldt commented Apr 11, 2014

+1

@russellvt
Copy link

@russellvt russellvt commented Apr 17, 2014

Definitely +1 ... should be done for consistency, alone. And, it would be nice to not have to work around it (which then becomes a "set and forget").

@brimo
Copy link

@brimo brimo commented May 5, 2014

+1

2 similar comments
@michaelheyvaert
Copy link

@michaelheyvaert michaelheyvaert commented May 5, 2014

+1

@bnikolaus
Copy link

@bnikolaus bnikolaus commented May 9, 2014

+1

@srimandarbha
Copy link

@srimandarbha srimandarbha commented Nov 21, 2014

+1

@bitprophet
Copy link
Member

@bitprophet bitprophet commented Dec 10, 2014

Why are people still plussing this when #1121 is merged and released? 😢 @srimandarbha ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.