I am interacting with a SFTP server that deletes files once they are downloaded. To prevent data loss, I need to read the file, land it on persistent storage and then close the connection to indicate I have received it. What's not obvious to me is what happens if I can't safely store the file. Is there a way to close the connection in a way that semantically indicates 'I'm closing the connection and it failed'? All I am finding in the RFC is a SSH_FXP_CLOSE message, which seems to only signal successful transfer. All the other error message types appear to only be used when a server returns a response to a client, not the other way around.
Can I negatively close a SFTP file transfer from the client side?
1.2k views Asked by JSacksteder At
1
There are 1 answers
Related Questions in SFTP
- Failing to pass a downloaded file-like object from sharepoint using the shareplum and paramiko libraries
- SolarIs 11 VM configure sftp. After restart ssh, the sshd_config file resets?
- Ebay upload CSV: Missing Brand when is already filled, also with MPN
- How to delay preMove for each file detected using SFTP?
- Python SFTP Connection Fabric files.exist does not find the file
- Using Jsch for file transfer from remote to local but file getting deleted on getting input stream
- S3 to SFTP sync operator
- Sftp file transfer using powershell in windows
- How to use pysftp with the -o"HostKeyAlgorithms=+ssh-rsa" -o"PubkeyAcceptedKeyTypes=+ssh-rsa" options?
- Issues with processing large Excel files from SFTP using Roo gem in Rails application
- org.apache.sshd.client.SshClient How to use proxy ? (SFTP)
- How do I force the php function ssh2_sftp() to crash or timeout instead of hanging?
- Download entire folder
- phpseclib fails more than succeeds - php script
- Wildcard(*) SFTP in an expect script?
Related Questions in IBM-STERLING
- IBM Sterling map editor: is there a way to sort OID in 204 EDI
- IBM Sterling File Gateway - iFix zip - unzip fails
- Location of Java installer for Windows Perimeter Server
- SFTP Client LIST service parameter "ModificationTime"
- How to grab values between xml in SQl statement
- How can i read the RFH2 header in my process data or primary document in my business process when the input is a .rfh file
- IBM Sterling file transfer
- IBM Sterling Connect:Direct and encryption
- Connect Direct (NDM)
- How to pick a specific type of file (XML , txt) via GPM using a Business Process in Sterling Integrator
- Sterling Map Editor : Conditional Null Value
- how to programmaticaly get events from sterling file gateway?
- How to get the list of active BP in IBM Sterling B2B Integrator
- Create a script to collect files from yesterday
- SQL query to display IBM Sterling B2B Integrator BPs configuration with the meaning of each PERSISTENCE_LEVEL
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
You cannot signal an error to the SFTP server, that's not what SFTP is intended for.
For your particular case, simply closing an SFTP connection without closing the file explicitly (not sending the
SSH_FXP_CLOSE) could indicate to the server that something went wrong.Though it really depends on your server implementation, what it considers an error. The documentation of the SFTP server should describe what it is that triggers the delete.
In SFTP there's nothing like a "download" operation (contrary to FTP
RETRcommand). There are only trivial file operations, like opening file (for reading or writing), reading piece of a file, closing a file. So it is not as simple as "server deletes the file after it is downloaded". The rule can say for example "server deletes the file after it is closed after being previously opened for reading" or something like that.