Bug 247802 - sftp problem while transferring files to a partition which is 100% full
Summary: sftp problem while transferring files to a partition which is 100% full
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: openssh
Version: 4.4
Hardware: i386
OS: Linux
low
high
Target Milestone: ---
: ---
Assignee: Tomas Mraz
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-07-11 14:50 UTC by Som
Modified: 2018-10-27 12:58 UTC (History)
2 users (show)

Fixed In Version: RHSA-2007-0703
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-15 14:58:19 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2007:0703 0 normal SHIPPED_LIVE Moderate: openssh security and bug fix update 2007-11-15 14:57:55 UTC

Description Som 2007-07-11 14:50:47 UTC
Description of problem:
sftp problem when the partition is full. Not bailing out.

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


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:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Tomas Mraz 2007-07-23 10:49:48 UTC
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 11:08:37 UTC
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 12:19:10 UTC
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 14:10:25 UTC
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 14:38:33 UTC
Note - we could and should fix the exit status of sftp in batch mode as in:
https://bugzilla.mindrot.org/show_bug.cgi?id=1252


Comment 14 Tomas Mraz 2007-08-07 20:33:38 UTC
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
successful.

Comment 25 Tomas Mraz 2007-08-14 09:11:06 UTC
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 14:58:19 UTC
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.

http://rhn.redhat.com/errata/RHSA-2007-0703.html



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