does not work on freeBSD but works on linux, and windows

From: John fabiani (jfabiani_at_yolo.com)
Date: 06/30/04


Date: Wed, 30 Jun 2004 01:34:53 GMT

Hi,
this is a little strange. All I'm trying to do is ftp a 'dbf' file - but
the file is corrupt after the transfer.

1. the freeBSD 4.4 is a couple of years old using:

Python 2.1.1 (#1, Sep 13 2001, 18:12:15)
[GCC 2.95.3 20010315 (release) [FreeBSD]] on freebsd4
Type "copyright", "credits" or "license" for more information.

2. below is a simple ftp program

import ftplib
import sys
remote=ftplib.FTP(host='myIpAddress',user='username',passwd='password')
mohpac07=open("/usr/home/spx/servplus/outbounds/mohpac07.dbf",'rb')
remote.set_debuglevel(2)
remote.set_pasv(0)
remote.storbinary("STOR mohpac07.dbf",mohpac07,8192)
remote.close
remote.quit

3. below is the output.

*cmd* 'TYPE I'
*put* 'TYPE I\r\n'
*get* '200 Switching to Binary mode.\r\n'
*resp* '200 Switching to Binary mode.'
*cmd* 'PORT 190,10,10,2,14,194'
*put* 'PORT 190,10,10,2,14,194\r\n'
*get* '200 PORT command successful. Consider using PASV.\r\n'
*resp* '200 PORT command successful. Consider using PASV.'
*cmd* 'STOR mohpac07.dbf'
*put* 'STOR mohpac07.dbf\r\n'
*get* '150 Ok to send data.\r\n'
*resp* '150 Ok to send data.'
*get* '226 File receive OK.\r\n'
*resp* '226 File receive OK.'

I then test the dbf file by attemping to open the file with foxpro and
the file is corrupt (not a table). The strange thing the same code
works from XP, and Linux (both are python 2.3). I don't know much about
freeBSD and I'm not sure if I can install 2.3.

Anybody no why this is happening?

TIA
John



Relevant Pages

  • Does python work with freeBSD
    ... the file is corrupt after the transfer. ... *resp* '200 PORT command successful. ... I then test the dbf file by attemping to open the file with foxpro and ... I don't know much about freeBSD and I'm not sure if I ...
    (comp.unix.bsd.freebsd.misc)
  • smb_iod_recvall: drop resp with mid errors
    ... I have a CIFS share mounted from a Windows 2003 server on FreeBSD ... drop resp with mid 5412 ...
    (freebsd-questions)