LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   MS-word file transfer in linux (https://www.linuxquestions.org/questions/programming-9/ms-word-file-transfer-in-linux-91675/)

shibdas 09-11-2003 12:50 PM

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

Eqwatz 09-11-2003 01:23 PM

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.

harperonline 09-11-2003 01:53 PM

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!

tcaptain 09-11-2003 02:04 PM

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. "

Strike 09-12-2003 12:26 AM

The solution is to just use the normal FTP protocol instead of some hacked-together ad hoc protocol.

UltimaGuy 09-12-2003 06:15 AM

This is what I was going to suggest. You should use the ftp protocol, and I don't think you will have any problem.

shibdas 09-12-2003 01:00 PM

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

Strike 09-12-2003 01:27 PM

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.

shibdas 09-12-2003 02:47 PM

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

Strike 09-12-2003 03:09 PM

Find an FTP library out there that you like. Debian has a ftplib-dev package, for example, that I imagine would meet your needs.

shibdas 09-13-2003 06:32 AM

Hi,

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

shibdas


All times are GMT -5. The time now is 09:45 PM.