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

Allow Specification of a New File Mode in scp.put #84

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sjbronner
Copy link

I am using this library to transfer files to embedded devices running dropbear. By default, this doesn't support SFTP, which I would prefer to keep that way in order to keep things small and simple. However, I do need to control the file modes on the target. And since the SCP protocol allows specification of a mode, I thought extending this library would be more elegant than following up the scp.put command with an ssh.exec_command('chmod ...') command.

I am using this library to transfer files to embedded devices running dropbear. By default, this doesn't support SFTP, which I would prefer to keep that way in order to keep things small and simple. However, I do need to control the file modes on the target. And since the SCP protocol allows specification of a mode, I thought extending this library would be more elegant than following up the scp.put command with an ssh.exec_command('chmod ...') command.
@remram44
Copy link
Collaborator

This is a good idea! Could you add a little test to test.py?

@remram44
Copy link
Collaborator

remram44 commented Nov 8, 2017

Maybe chmod should be a mask, instead of overriding the file's mode? 🤔

@remram44
Copy link
Collaborator

remram44 commented Nov 9, 2017

Seems a duplicate of #58

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

Successfully merging this pull request may close these issues.

2 participants