Skip to content

Comments

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

Open
sjbronner wants to merge 1 commit intojbardin:masterfrom
sjbronner:patch-1
Open

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

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