Skip to content

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

Open
sjbronner wants to merge 1 commit into
jbardin:masterfrom
sjbronner:patch-1
Open

Allow Specification of a New File Mode in scp.put#84
sjbronner wants to merge 1 commit into
jbardin:masterfrom
sjbronner:patch-1

Conversation

@sjbronner

Copy link
Copy Markdown

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
Copy Markdown
Collaborator

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

@remram44

remram44 commented Nov 8, 2017

Copy link
Copy Markdown
Collaborator

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

@remram44

remram44 commented Nov 9, 2017

Copy link
Copy Markdown
Collaborator

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