WinSCP: Error decoding SFTP packet
Overview
There is currently an error on version 3.2.1 involving WinSCP and the creation of Folder
objects under your chroot directory.
This error only affects the WinSCP client -- other clients such as FileZilla are not affected.
Note: This issue has been resolved in version 3.003.00.
Error message and behavior
Here is a screenshot of the error message from the WinSCP client:
The problem is that WinSCP is unable to list the chroot directory if there is a subfolder that is backed by an SFTP Gateway Folder object.
For example, say that userA
points to the default chroot directory:
/users/userA/
You can trigger the error by going to the Folders tab, and creating a Folder object under the userA/
folder:
/
/users/
/users/userA/
/users/userA/test/
WinSCP will not be able to read the test/
subfolder, because it is backed by an SFTP Gateway Folder object.
However, if you delete the /userA/test/
Folder mapping in the SFTP Gateway web admin portal, the user should be able to log in again via WinSCP.
Workarounds
Creating a normal subfolder in Blob storage via the Azure Portal does not trigger the error. So, if you want to create a subfolder inside the SFTP user's chroot directory, please do so using the Azure portal rather than the SFTP Gateway Folders tab.