SFTP PutFile using a stream does not set file permissions

Advertisement

Guest

SFTP PutFile using a stream does not set file permissions

I am trying to use the .NET Assembly using the following code:
session.PutFile(inputStream,remoteFile,options: new TransferOptions { FilePermissions = new FilePermissions { Octal = "666" }});
The file transfers successfully but the permissions do not update. Using the PutFiles command with a local file works correctly.
Any ideas?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,442
Location:
Prague, Czechia

Re: SFTP PutFile using a stream does not set file permissions

Indeed, preserving permissions is not supported with Session.PutFile.

Reply with quote

Guest

Re: SFTP PutFile using a stream does not set file permissions

That is unfortunate. That does mean that for most use cases this command is useless.

Reply with quote

martin
Site Admin
martin avatar

Re: SFTP PutFile using a stream does not set file permissions

Come on, most use cases use the default permissions.

Reply with quote

Advertisement

You can post new topics in this forum