Networking Forums

Networking Forums > Computer Networking > Linux Networking > vsftpd corrupt writes to CIFS mounts. *solved*

Reply
Thread Tools Display Modes

vsftpd corrupt writes to CIFS mounts. *solved*

 
 
brigman
Guest
Posts: n/a

 
      02-27-2008, 02:23 AM
I have been using vsftpd to write to some CIFS filesystems mounted
under /var/ftp but consistently found that inbound files were
corrupted by many kilobytes of zero values starting from byte position
1. The amount of zero values varied from between locations
0x000001:0x00a000 and 0x000001:0x00f000 (and possibly further). but
position for position, the remainder of the file matched the original;
i.e. the first portion of the file was not actually displaced, but
simply replaced by zero values.

The general consensus on the web/usenet (etc) is to turn on the
use_sendfile=NO option in vsftpd.conf, but this would only save the
first write after any restart of the vsftpd service. The actual
solution came from mounting the directories with the mount.cifs option
"nobrl" which configures the kernel such that it does not send byte
range lock requests to the server. Or something.

use_sendfile=NO did however have a use in preventing "426 Failure
writing network stream." on ftp reads.

The entire mount commands were:

mount -t cifs -o credentials=/etc/samba/cifs_credentials -o rw -o
nobrl //Win2003SR2/ftp$/inbound /var/ftp/inbound
mount -t cifs -o credentials=/etc/samba/cifs_credentials -o rw -o
nobrl //Win2003SR2/ftp$/outbound /var/ftp/outbound

packages in use (not necessarily relevant):

samba-client-3.0.25b-1.el5_1.4
samba-common-3.0.25b-1.el5_1.4
kernel-xen-2.6.18-53.1.6.el5
vsftpd-2.0.5-10.el5

Hope this helps.
 
Reply With Quote
 
 
 
 
Randell_D
Guest
Posts: n/a

 
      02-28-2008, 09:56 AM
Thanks for the above - I experienced some similar problems years ago
and never resolved it - If I remember correctly I could ftp every file
except a gif file - the gif's were always corrupted, everything else
(from pdf, word, png, jpg, html and windoze exe files) all arrived
fine. I only found one other person on the 'net who had a similar
problem but we couldn't find a solution.

I would have liked to have the same situation to try your solution...
the environment is dead now though...
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: NFS writes became extremely slow overnight General Schvantzkoph Linux Networking 10 07-14-2010 09:05 AM
Newbie - Optimizing NFS writes jon wayne Linux Networking 2 09-07-2006 10:03 AM
PISED OFF about cifs (mounts w/guest logons do not work) Ignoramus28822 Linux Networking 2 04-10-2006 11:30 AM
vsftpd with ssl - vsftpd.user_list not working shaped Linux Networking 0 01-31-2006 07:04 PM
NFS async writes working in 2.4.7 but not 2.4.20 nospam@dontspamme.com Linux Networking 1 10-12-2004 08:13 PM



1 2 3 4 5 6 7 8 9 10 11