Bug 247802 - sftp problem while transferring files to a partition which is 100% full
sftp problem while transferring files to a partition which is 100% full
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: openssh (Show other bugs)
i386 Linux
low Severity high
: ---
: ---
Assigned To: Tomas Mraz
Brian Brock
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2007-07-11 10:50 EDT by Som
Modified: 2010-10-22 12:15 EDT (History)
2 users (show)

See Also:
Fixed In Version: RHSA-2007-0703
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-11-15 09:58:19 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Proposed patch (1.48 KB, patch)
2007-08-07 08:19 EDT, Tomas Mraz
no flags Details | Diff
Proposed patch for sftp client (1.98 KB, patch)
2007-08-07 16:33 EDT, Tomas Mraz
no flags Details | Diff

  None (edit)
Description Som 2007-07-11 10:50:47 EDT
Description of problem:
sftp problem when the partition is full. Not bailing out.

Version-Release number of selected component (if applicable):

How reproducible:
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:
Actual results:

Expected results:

Additional info:
Comment 1 Tomas Mraz 2007-07-23 06:49:48 EDT
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.
Comment 2 Tomas Mraz 2007-07-23 07:08:37 EDT
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.
Comment 11 Tomas Mraz 2007-08-07 08:19:10 EDT
Created attachment 160805 [details]
Proposed patch

This patch implements checks when no write to a file succeeded -> we then
unlink the file.
Comment 12 Tomas Mraz 2007-08-07 10:10:25 EDT
Comment on attachment 160805 [details]
Proposed patch

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!
Comment 13 Tomas Mraz 2007-08-07 10:38:33 EDT
Note - we could and should fix the exit status of sftp in batch mode as in:
Comment 14 Tomas Mraz 2007-08-07 16:33:38 EDT
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
Comment 25 Tomas Mraz 2007-08-14 05:11:06 EDT
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.
Comment 26 errata-xmlrpc 2007-11-15 09:58:19 EST
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.


Note You need to log in before you can comment on or make changes to this bug.