LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-30-2008, 04:11 AM   #1
mmn357157
LQ Newbie
 
Registered: May 2007
Location: Bangalore
Distribution: RHEL
Posts: 20

Rep: Reputation: 0
how to find corrupted or incomplete files uploaded using ftp.


Hi All,

I have a set of shell programs which will read zip,txt,csv and jpg files from different ftp locations and process it everyday.

The ftp accounts are configured in a Windows server and shell programs are running a in Linux server. Both are sharing the same filesystem through NAS storage. The storage is basically an NTFS filesystem and is mounted in linux serevr using NFS sharing service provided by Microsoft.

The linux shell programs are directly accessing the ftp home directories in the storage and picking user uploaded files at specified intervals.

The problem what I am facing is, sometimes the files can be corrupted as it is being uploaded by clients over internet. We faced similar problems several times with corrupted files and it will create problem in shell script processing.

The shell scripts are processing in different stages and the final stage will call database procedures with processed data.

Now my question is, how I can find out and skip the processing for corrupted and incomplete text and csv files (also jpgs).

We have already taken care of

1. all empty and missing files
2. corrupted zip files (unzip -t <filename>)

Thanks,

MMN
 
Old 10-30-2008, 08:57 AM   #2
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
One way would be to have the client checksum the files (md5sum, sha1sum, ...) and upload the checksum as well. Then when you pull the file you can compare the checksum, if they don't match its a corrupted file.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
FTP mystery - uploaded file disappears! Sagebrush Gardener Linux - Server 3 02-26-2009 09:22 AM
change group of ftp uploaded files GATTACA Linux - Networking 3 07-21-2008 08:06 PM
files uploaded to anonymous ftp not readable by anonymous TheOneAndOnlySM Linux - Software 2 11-04-2004 07:42 AM
How to keep the original time of files uploaded to FTP server wondial Linux - Software 1 10-26-2004 10:12 PM
File uploaded via FTP have bad permissions breakerfall Linux - Networking 7 12-28-2003 04:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration