Bug 171308

Summary: Uploaded file corrupted when two connections from same client uploading same file simultaneously
Product: Red Hat Enterprise Linux 3 Reporter: Rick Zhong Liming <rick.zhong>
Component: vsftpdAssignee: Radek Vokál <rvokal>
Status: CLOSED ERRATA QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2006-0250 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-03-22 16:30:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 187538, 250727    
Attachments:
Description Flags
rename patch for vsftpd-1.2.1 none

Description Rick Zhong Liming 2005-10-20 16:54:43 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; InfoPath.1)

Description of problem:
I am using Redhat EL3 (AS) Taroon Update 5 with kernel 2.4.21-32.0.1.ELsmp. The vsftpd.conf is in /etc/vsftpd and it is started by "service vsftpd start".

The vsftpd configuration is mostly in default settings. I have tested a number some other vsftpd version (v1.2.2 rpm package for rh9), also encounter this problem. I have also tuned some of the vsftpd configuratons such as "enable chroot user", "enable ascii upload" etc and this bug is reproduced in all the tests. 

Version-Release number of selected component (if applicable):
vsftpd-1.2.1-3E.1 

How reproducible:
Always

Steps to Reproduce:
1.Launch 2 ftp connections to the ftp server
2.start uploading a file from both connections to the same destination folder
3.make sure both connections are transfering the same file simultaneously 
  

Actual Results:  the resulting upload will be corrupted with file size around double of the orginal file

Expected Results:  A correct copy of upload from the most recent transfer (the connection which ends later )

Additional info:

It seems that the two ftp transfer streams somehow merged due to the identical file name.

Comment 2 Radek Vokál 2005-10-21 08:48:18 UTC
I've got a patch for this issue, it's on proposed list for next RHEL update. 

Comment 3 Rick Zhong Liming 2005-10-21 09:53:43 UTC
(In reply to comment #2)
> I've got a patch for this issue, it's on proposed list for next RHEL update. 

Hi, can you send me the patch for testing? or do i have to request through my 
redhat channel?


Comment 4 Radek Vokál 2005-10-21 10:03:16 UTC
Created attachment 120244 [details]
rename patch for vsftpd-1.2.1

This patch renames the target file and overwrites the same file.. 

Would be great if you can test it and prove that it's correct.

Comment 5 Rick Zhong Liming 2005-12-08 15:17:42 UTC
Hi, man , Thanks the patch works perfectly.


Comment 6 Radek Vokál 2005-12-08 15:41:56 UTC
Added to Update propose list

Comment 14 Red Hat Bugzilla 2006-03-22 16:30:34 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/RHBA-2006-0250.html