Bug 440952

Summary: Files uploaded to CIFS corrupted
Product: [Fedora] Fedora Reporter: Peter Kuma <peterkuma>
Component: vsftpdAssignee: Martin Nagy <mnagy>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: hripps, mnagy
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-04 17:39:51 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:
Attachments:
Description Flags
Corrupted uploaded file none

Description Peter Kuma 2008-04-04 17:19:43 UTC
Description of problem:

Files uploaded to CIFS file system are corrupted. Blocks of data are interleaved
with blocks of zero bytes. Blocks are always multiples of kilobytes, e.g. 36B of
data, 4B of \0, 4B of data, 8B of \0, and so on.
CIFS partition is mounted with default options.
Files copied directly or uploaded over SCP are fine.
Example file is attached.

Version-Release number of selected component (if applicable):
vsftpd 2.0.5-2
Linux <hostname> 2.6.18-5-686 #1 SMP Mon Dec 24 16:41:07 UTC 2007 i686 GNU/Linux
Debian GNU/Linux etch (stable)

How reproducible:

Upload file larger than a few kilobytes to a CIFS-mounted partition.
Reproducible with at least these FTP clients: gFTP, Filezilla.

Additional info:

Problem can be avoided by setting nobrl option of mount.cifs as suggested by
brigman on comp.os.linux.networking;
http://groups.google.com/group/comp.os.linux.networking/browse_thread/thread/5b2228ee622eb623.

From mount.cifs(8):
nobrl
Do not send byte range lock requests to the server. This is nec-
essary  for  certain  applications  that  break  with cifs style
mandatory byte range locks (and most cifs  servers  do  not  yet
support requesting advisory byte range locks).

If not fixed it should be at least mentioned in vsftpd.conf(5) man page.

Comment 1 Peter Kuma 2008-04-04 17:19:43 UTC
Created attachment 301314 [details]
Corrupted uploaded file

Comment 2 Martin Nagy 2008-04-04 17:39:51 UTC
Sorry, but this is not specific to Fedora. If you want to get this fixed I
suggest that you contact the vsftpd maintainer. Hence closing this bug with a
resolution of NOTABUG.