Opening RW on read causes issues with some SFTP servers.
funkyshu opened this issue · comments
Describe the bug
A recent update to change Read() calls to open a file with os.O_RDWR returns a generic SSH_FX_Failure error on some servers.
Instead of of opening RW, we should open RO on initial Read and reopen in RW is Write is later called. This is a bit of a contrived scenario (writing after reading) but it is possible.