Red Hat Bugzilla – Bug 247802
sftp problem while transferring files to a partition which is 100% full
Last modified: 2010-10-22 12:15:23 EDT
Description of problem:
sftp problem when the partition is full. Not bailing out.
Version-Release number of selected component (if applicable):
1. Create a dummy partition /abc
2. Completely fill the partition /abc to 100%
3. In our application we are trying to sftp some files from /var/tmp [any
directory ] to /abc. The files are getting transferred to /abc with 0 bytes [ we
are trying batch mode ]. But the expected behaviour is that the sftp should bail
out when it finds partition full.
4. Files should not get transferred even as 0 bytes.
Steps to Reproduce:
This is fixed in openssh-4.5p1. On the other hand it will also bail out when
copying files of zero size which is not 100% correct either.
It is also fixed in RHEL-5 openssh. If you request it being fixed in RHEL-4 use
your support options http://www.redhat.com/support to report this bug and
mention this bug report number.
Created attachment 160805 [details]
This patch implements checks when no write to a file succeeded -> we then
unlink the file.
Comment on attachment 160805 [details]
After discussion with mitr - this patch is definitely a bad idea - 1. changes
protocol behavior 2. sftp can write to special files - we mustn't unlink them!
Note - we could and should fix the exit status of sftp in batch mode as in:
Created attachment 160853 [details]
Proposed patch for sftp client
This patch fixes the inconsistency in sftp client behavior - with it sftp
always returns exit status 1 in batch mode when the write was not completely
Note that abort in batch mode is per command so when you transfer multiple files
using wildcard match it will not abort before all the matching files are
transfered even if some individual transfer fails.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.