You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fallbacks for servers that do not support fsync? #617
I am using this package in a backup tool that uploads and deletes archives from remote servers. An issue was raised that deletion fails SSH_FX_FAILURE in cases the server does not support fsync.
Is there any way built into this package that would let me fall back to plain ssh commands or something similar in such cases, or would clients need to do this in a completely separated track?
Huh… it does seem we’re not checking to ensure the fsync permission is available before sending it… but I also don’t think the fsync is related to the issue seen in the issue linked…
There’s really not a fall back that could be done for servers that don’t support fsync, we would just need to short-circuit return nil in such a case.
In any case, let’s continue to convo there. (I’m just dropping this here for anyone stumbling on this issue first.)
dev-2 already has a short-circuit to return an sshfx.StatusOpUnsupported if the extension is not supported. Clients will still need to anticipate that this error might happen, and ignore such an error if it happens, but there isn’t the possibility that we should send a packet that we know the server will reject, which can at times cause the server to disconnect. (Though, I don’t see why it would need to, just sending back an SSH_FX_OP_UNSUPPORTED and then carrying on should be fine. 🤔 Anyways, better to not send a packet that the server says it would reject anyways.)
Would you like to make a ticket to add checking the extension to exist in the v1 API, or shall I?
I'm under the impression you're finding your way around this topic a lot better than I do, so if you could do it, that'd create a much more informative and precise issue I guess. Thanks.
Activity
puellanivis commentedon Feb 26, 2025
Huh… it does seem we’re not checking to ensure the
fsyncpermission is available before sending it… but I also don’t think thefsyncis related to the issue seen in the issue linked…There’s really not a fall back that could be done for servers that don’t support
fsync, we would just need to short-circuitreturn nilin such a case.In any case, let’s continue to convo there. (I’m just dropping this here for anyone stumbling on this issue first.)
puellanivis commentedon Feb 27, 2025
dev-2already has a short-circuit to return ansshfx.StatusOpUnsupportedif the extension is not supported. Clients will still need to anticipate that this error might happen, and ignore such an error if it happens, but there isn’t the possibility that we should send a packet that we know the server will reject, which can at times cause the server to disconnect. (Though, I don’t see why it would need to, just sending back anSSH_FX_OP_UNSUPPORTEDand then carrying on should be fine. 🤔 Anyways, better to not send a packet that the server says it would reject anyways.)Would you like to make a ticket to add checking the extension to exist in the
v1API, or shall I?m90 commentedon Feb 27, 2025
I'm under the impression you're finding your way around this topic a lot better than I do, so if you could do it, that'd create a much more informative and precise issue I guess. Thanks.
puellanivis commentedon Mar 12, 2025
Resolved by #618