LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-11-2003, 12:50 PM   #1
shibdas
Member
 
Registered: Jun 2003
Posts: 32

Rep: Reputation: 15
MS-word file transfer in linux


Hi everybody,
I am facing an interoperability problem in a networked environment. I have a linux server and a windows client which connects to the server using dial up. Data transfer takes place through the socket interface. Since the sequence of the packets in this type on environment can not be achievable always I have a packet delimiter chr(3) i.e ASCII chracter 3 for each chunk of data I am transferring. There is also a start and end sequence which indiactes the start and end of the file respectively. Now, while I am transferring text files it is running perfectly but when I am transferring word, excel or ppt files from windows then it is not transferred properly. May be that the ASCII chr(3) is present in the word files but in that case the packet will be split. In this case it is just able to identify the filename which I am sending in another packet and then the receving is never complete

I will be grateful if anyone can suggest some technique without altering packet delimiter to solve this problem.

Shibdas
 
Old 09-11-2003, 01:23 PM   #2
Eqwatz
Member
 
Registered: May 2003
Distribution: Slack Puppy Debian DSL--at the moment.
Posts: 341

Rep: Reputation: 30
I still don't think you have to worry about packet size in your program itself. I think that issue can be covered in the O.S. with MTU settings. And I believe both XP and Linux will accept a little script which tell them a Maximum Transfer Unit when using a modem as opposed to ethernet. When I fail-over to modem, my MTU changes to a smaller number--it has been so long since I set that up I don't remember how I did it. But I am certainly way to lazy to write code for that. [Maybe I just set the packet size smaller and left it that way. Don't know. I don't have a high traffic network--packet size in my case doesn't seem to have much of an effect. Your milage may differ.]

I know one thing, and that is to do the very least I can when writing code. If I don't concentrate on one thing, I turn the damn thing into rocket science. That's just me. You may be different.

And, doesn't the fact that it is government make it a necessity that you use a secure shell type of transfer and communication?

The scenario you describe could be a variation of what professors do at any computer science department--the student accounts. And they do that with scripts. These days they lock those accounts down pretty darn tight. They have to be student-proof. Find one and ply him with praise/beer and get his scripts. That would simplify the Linux side of it anyway. (why do "C" coding when you can copy someone's bash script?)[I guess you could call bash scripts shell programming. It is at a higher level, is very powerful and gets a whole lot done with not much work.]

Or another way of doing it--if we are talking about pure text, is to do it through a special e-mail account. The e-mail server could check for mal-ware (and authenticate the sources for the messages) before making the call through modem to upload/download encrypted messages to the secured server. [Most enterprise level e-mail servers have a modem for fail-over already. They have the ability to read all of the headers and authenticate messages. And, they have the ability to have password/authentication of users. The only thing you would have to do then is script a pop-up window for passwords when accessing that specific mail account. An that is built into XP--so is encyption. Just disable the "remember password" for that account--which would be a script.] {Even the most inept seem to know how to e-mail.}

If you since the keys for the encryption would be on the secure server--not the mail server--the encrypted mail would have another back-up. The admin. is supposed to keep records of e-mails for a time. 128 key encryptions are pretty darn secure--so that probably wouldn't be a problem.

Last edited by Eqwatz; 09-13-2003 at 01:42 AM.
 
Old 09-11-2003, 01:53 PM   #3
harperonline
Member
 
Registered: Mar 2003
Distribution: Centos5*,OpenBSD,Debian*
Posts: 32

Rep: Reputation: 15
Angry

Perhaps it is posted twice to get peoples attention. Have you seen how little the numbers that have responded to this thread you freak! Give the guy a break, besides its his/her business!
 
Old 09-11-2003, 02:04 PM   #4
tcaptain
LQ Addict
 
Registered: Jul 2002
Location: Montreal
Distribution: Gentoo 2004 from stage 1 baby!
Posts: 1,403

Rep: Reputation: 45
Quote:
Originally posted by harperonline
Perhaps it is posted twice to get peoples attention. Have you seen how little the numbers that have responded to this thread you freak! Give the guy a break, besides its his/her business!
I quote from the rules:

"Do not post the same discussion in more than one forum. Duplicate discussions can be frustrating for other members. Try and pick the most relevant forum for your post. If you are unsure put it in Linux - General. "
 
Old 09-12-2003, 12:26 AM   #5
Strike
Member
 
Registered: Jun 2001
Location: Houston, TX, USA
Distribution: Debian
Posts: 569

Rep: Reputation: 31
The solution is to just use the normal FTP protocol instead of some hacked-together ad hoc protocol.
 
Old 09-12-2003, 06:15 AM   #6
UltimaGuy
Member
 
Registered: Aug 2003
Location: Chennai, India
Distribution: PCLinuxOS .92, FC4
Posts: 840

Rep: Reputation: 32
This is what I was going to suggest. You should use the ftp protocol, and I don't think you will have any problem.
 
Old 09-12-2003, 01:00 PM   #7
shibdas
Member
 
Registered: Jun 2003
Posts: 32

Original Poster
Rep: Reputation: 15
Hi everydody,
I am ver sorry for the inconvenience caused. It was mistakenly posted not to draw attention. Very sorry.. .

Now actually the data transfer is both ways i.e when windows machines connect to the server it receives the files as well as upload it. I know I can use FTP upload and download to do the job but I don't have that permission to do so. So, I need to deploy my own programs to do the job.

Please help if something can be done in this situation.

shibdas
 
Old 09-12-2003, 01:27 PM   #8
Strike
Member
 
Registered: Jun 2001
Location: Houston, TX, USA
Distribution: Debian
Posts: 569

Rep: Reputation: 31
Quote:
Originally posted by shibdas
I know I can use FTP upload and download to do the job but I don't have that permission to do so. So, I need to deploy my own programs to do the job.
So deploy programs that implement FTP.
 
Old 09-12-2003, 02:47 PM   #9
shibdas
Member
 
Registered: Jun 2003
Posts: 32

Original Poster
Rep: Reputation: 15
Hi,
I think it would be better if I describe the whole scenario. First of all the programs are developed for government officials who has not touched computers before ( It is the real situation here). So, user friendliness is the most important thing for the software. They can't do FTP upload or download for that matter. The scenario is as follows:-

There is a central office at X where the Linux server running RH 8.0 is located. There are sub-offices in other places such as Y1, Y2.... Y14 each having a computer running Windows XP. Now, at the server there is an application directory lets say /opt/data-trans. Under that directory there is a directory for every place Y1,Y2...Y14. Now, under each directory say Y1 there are two sub-directories "send" and "receive". In "send" directory the files that are to be sent to that place e.g. Y1 is stored and in the "receive" directory the files which are transferred from Y1 to the server are stored.

On the other side, in each of the nodes Y1,Y2...Y14 there are "send" and "receive" directory for sending the files to the server and receving files from the server. Now, each node can connect to the server using dial up connection and not the other way round.When a particular node say Y1 connects to the server X files in the "send" directory of Y1 sub-directory are sent to the node and any files if sent from the node is stored in the "received" directory.

The client side is written in visual basic( which has a control for FTP transfer) while the server side is written in C.

I think I have made you understand the problem. Please help with this settings how FTP transfer can be used/ implemented.

Thank you for reading this long post.

shibdas
 
Old 09-12-2003, 03:09 PM   #10
Strike
Member
 
Registered: Jun 2001
Location: Houston, TX, USA
Distribution: Debian
Posts: 569

Rep: Reputation: 31
Find an FTP library out there that you like. Debian has a ftplib-dev package, for example, that I imagine would meet your needs.
 
Old 09-13-2003, 06:32 AM   #11
shibdas
Member
 
Registered: Jun 2003
Posts: 32

Original Poster
Rep: Reputation: 15
Hi,

I want to know if there is something for red hat. thanks

shibdas
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to do file transfer in linux pspandu Linux - General 7 09-12-2006 02:09 AM
File Transfer from XP to Linux e11 Linux - Newbie 8 11-06-2004 11:17 AM
file transfer from linux to xp michi56 Linux - Newbie 5 03-07-2004 12:26 PM
MS-Word file transfer in Linux shibdas Linux - Networking 1 09-11-2003 01:22 PM
how to recover MS-WORD and MS-EXCEL password protected file in Linux !!! hitesh_linux Linux - Software 1 07-15-2003 03:05 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:48 PM.

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