We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I put -p somefile while the connected user has a ChrootDirectory set, the operation always fails with "remote fsetstat: Bad message".
put -p somefile
ChrootDirectory
The probable root cause was tracked down by @MichaelEischer. Quoting from restic/restic#4335 (comment):
The error looks very much like a bug in the homegrown chroot implementation used in the Windows openssh sftp port. In https://github.com/PowerShell/openssh-portable/blob/661803c9ec4d7dee6574eb6ff0c85b2b7006edb1/contrib/win32/win32compat/w32fd.c#L1013 it first retrieves the filepath for the handle (the real path on the windows filesystem) and passes it to w32_chmod which applies the chroot a second time! That ultimately results in a call to _wchmod with a broken file path. This triggers an EINVAL error that gets translated to the "Bad message" error.
sftp> put -p somefile Uploading somefile to /somefile somefile 100% 22KB 6.9MB/s 00:00 <transfer completes w/o error>
sftp> put -p somefile Uploading somefile to /somefile somefile 100% 22KB 6.9MB/s 00:00 remote fsetstat: Bad message
No response
AllowGroups ssh-backup Match Group ssh-backup AuthorizedKeysFile C:/_backups/%u.authorized_keys ChrootDirectory C:/_backups/%u
OpenSSH_for_Windows_9.4p1, LibreSSL 3.7.3
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Prerequisites
Steps to reproduce
When I
put -p somefile
while the connected user has aChrootDirectory
set, the operation always fails with "remote fsetstat: Bad message".The probable root cause was tracked down by @MichaelEischer. Quoting from restic/restic#4335 (comment):
Expected behavior
Actual behavior
Error details
No response
Environment data
Version
OpenSSH_for_Windows_9.4p1, LibreSSL 3.7.3
Visuals
No response
The text was updated successfully, but these errors were encountered: