Setting permissions for file while transferring SFTP WinSCP client

I am trying to transfer a large file to a remote server using WinSCP client. During transferring the file (since the file is large it takes some time to transfer ) the permissions for are set to some default read only (rw-r----). By is using custom transfer settings https://winscp.net/eng/docs/ui_transfer_preset , I set some permissions for the file being transferred. But the permissions are only effective when the transfer of file is complete.

I need to set the permission for the file while the file transfer is in process (that means when the file is being transferred). How can I do this? Please anyone suggest something.


Solution 1:

WinSCP does not apply permissions when creating the remote file (before uploading the file contents). What if you wanted to really set the file read-only? (what your rw is not) The upload would fail. That's why WinSCP applies the permissions only after the upload.

But you can set umask the way you want and let the system handle the permissions, not WinSCP. See How to specify file permission when putting a file using OpenSSH sftp command


I do not know any other Windows SFTP client that allows settings permissions. OpenSSH sftp allows preserving permissions of source file. But that will not work on Windows.