Oracle Linux issue - all files FTPed to it from windows need to to be processed with dos2UNIX


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Oracle Linux issue - all files FTPed to it from windows need to to be processed with dos2UNIX
# 8  
Old 08-25-2016
Quote:
Originally Posted by hicksd8
I agree with cero. Redhat says it's doing a ASCII mode transfer but it lies and does a binary mode transfer anyway. I think that you have to force this. Please post the content of /etc/vsftpd/vsftpd.conf

One quick question, you have mentioned here that Redhat is doing ASCII transfer, but the issue we face is when I transfer the file from windows to Linux and not Vice Versa.
Also,
as mentioned previously, in the command window of dos, during ftp tp linux, I had mentioned ascii. So the ftp client on dos must have sent the file in ascii mode OR here the target(Linux) FTP server dictated terms and forced in binary?

Regarding contents of /etc/vsftpd/vsftpd.conf, I cannot put it here due to restrictions but, can you please tell me what exact thing to look into it?

---------- Post updated at 10:52 AM ---------- Previous update was at 10:42 AM ----------

One more thing, even if Redhat Linux forces the use of Binary mode, I also faced the issue when sending a proper binary file to Redhat. It also had the dos chars. Hows that possible then?

Last edited by Albert_Pinto7; 08-25-2016 at 12:48 PM..
# 9  
Old 08-25-2016
Quote:
Originally Posted by bakunin
.
.
.
The only thing "dos2unix" and similar tools do is to replace <CR><LF>-styly line ends (DOS/Win) to <NL>-style line ends (UNIX).
.
.
.
Not quite, I'm afraid. Back in those days when you had DOS PCs and code pages like 437 or 850, I had a long sed script to convert extended DOS char sets to *nix local char sets, which later was done by dos2unix on the fly (if I remember correctly, that is). It also converts between UTF-8 and UTF-16, I hear say.
But nowadays, when windows uses UTF-8 as well, it may reduce to just removing the <CR> characters.
# 10  
Old 08-25-2016
I'd be looking for things like:

Code:
 
 allow ascii upload=no

and/or

Code:
allow ascii download=no

Something on those lines
# 11  
Old 08-25-2016
Quote:
Originally Posted by hicksd8
I'd be looking for things like:

Code:
 
 allow ascii upload=no

and/or

Code:
allow ascii download=no

Something on those lines


Yes, found these line, but they are commented. So I guess its forcing binary as you said. But will these settings, which hare on the target Linux box, have any effect on the ftp which we do from a windows machine to it?
# 12  
Old 08-25-2016
Yes, sure they can. The config determines how the whole service behaves, in both directions. I am guessing but I reckon the Redhat default setup is different to the Solaris setup. You haven't changed anything on the Windows end have you? You've just changed the Unix/Linux end which infers the Linux end has caused the problem.

Remember though if you change any of the config that you need to restart the service for it to take effect. Be professional and take a copy of the whole damned thing before you mess with it.
# 13  
Old 08-25-2016
Quote:
Originally Posted by hicksd8
Yes, sure they can. The config determines how the whole service behaves, in both directions. I am guessing but I reckon the Redhat default setup is different to the Solaris setup. You haven't changed anything on the Windows end have you? You've just changed the Unix/Linux end which infers the Linux end has caused the problem.

Remember though if you change any of the config that you need to restart the service for it to take effect. Be professional and take a copy of the whole damned thing before you mess with it.
No changes on the windows side. But on Linux file I see that it forces binary as it fears denial of service attack. Not sure why Solaris didnt fear it, so may be it had some other protection.

So now what solution can we have for it?

Also the fact that Redhat is forcing binary is still not answering the other question as to why even files such as encrypted files which are sent from win to redhat in binary mode (explicitly chosen) still has dos chars. When we run dos2unix on them the size decreased and decryption happened successfully. Initially I had thought that those files were sent on Redhad in ascii mode by mistake. But now it is clear that they indeed went in binary (due to forcing). Then how they had dos chars issue?
# 14  
Old 08-25-2016
As I already said, the vsftpd.conf file determines how ftp behaves (and it can be quite a large file).

If you can't post the contents here then I think you are into researching the configuration options yourself. At least you know where to look.

Do appreciate that it's difficult for us to chip in with the answers when we aren't given all the information.

I'm not a RedHat expert. If you don't get any fairly immediate answers then perhaps ask moderators to move this thread to the RedHat specialist forum where it will more likely be noticed by RedHat specialists. There are already members subscribed to this thread who are also moderators with the clout to make that happen and who will read this anyway.
This User Gave Thanks to hicksd8 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

File processed in Unix had issue open using notepad

Dear all, I had a columned based file after processed from my script. In unix platform, my file is ok, with all columns sorted out nicely. But when i open in windows notepad, the columns are running out of order. Can some one help?? Thanks alot in advance (4 Replies)
Discussion started by: ymeyaw
4 Replies

2. Shell Programming and Scripting

copy files from linux to windows

is there any way to copy files from linux to windoes with out mounting ideally using a script in linux or windows which ever possible (4 Replies)
Discussion started by: robo
4 Replies

3. Shell Programming and Scripting

Issue regarding dos2unix perl script

Hi All, I have pearl script which will check and convert the file: INFO("dos2unix_cmds".$#{$dos2unix_cmds}); if ( $#{$dos2unix_cmds} == 0 ) { my $convert_cmd = $$dos2unix_cmds; my $rename_cmd = $$dos2unix_cmds; --conversion going here else INFO ("No need to... (8 Replies)
Discussion started by: saps19
8 Replies

4. Shell Programming and Scripting

Connect to Oracle in Windows XP from Linux HOST

Hi everyone, I have oracle 9i installed in Windows XP and i have ubuntu in VM WARE. I would like to know how to connect to Oracle in windows xp from Linux through shel scripting...... (3 Replies)
Discussion started by: Zimbu
3 Replies

5. Linux

Trying to FTP files from Windows to Linux

I am trying to FTP some files from a box running Windows XP to a Linux box and cannot get the right syntax for the file path. (5 Replies)
Discussion started by: Brian Miller
5 Replies

6. Shell Programming and Scripting

remember processed files

Hello dear community! I have the following task to accomplish: there is a directory with approximately 2 thousand files. I have to write a script which would randomly extract 200 files on the first run. On the second run it should extract again 200 files but that files mustn't intersect with... (5 Replies)
Discussion started by: sidorenko
5 Replies

7. Shell Programming and Scripting

Need year to display from ftped files list

Hi All, p_ftp=dummy time ftp -niv 192.0.0.2 << EOF user dummy dummy cd prt/$p_ftp ascii ls -ltr quit output is -rw-r--r-- 1 500 500 5137 Mar 04 11:21 dummy.csv can any one suggest how to get year while using ftp (1 Reply)
Discussion started by: Vrgurav
1 Replies

8. UNIX for Dummies Questions & Answers

How can I make dos2unix in hp without renaming files?

Hello all It seams that in HPUX when Im using dos2unix program I need to rename the file to new file and then back if I like to Format the file. Is there shorter way to do this? Thanks (2 Replies)
Discussion started by: umen
2 Replies

9. UNIX for Dummies Questions & Answers

View Files In Linux/Windows

I have a bunch of text files that currently reside on a red hat linux machine. I'd like to zip them up and copy them to a windows machine. I'm not sure about how to do this though since I believe zipping files up creates a totally different format that will be unreadable on windows. Is there any... (3 Replies)
Discussion started by: doublek321
3 Replies

10. UNIX for Dummies Questions & Answers

Is there a linux version of dos2unix command?

I'm having some probs and i know in unix i can do a dos2unix command and fix it, and it looks like that may be my problem now, but linux doesn't have dos2unix of course, anything comparable? (4 Replies)
Discussion started by: kymberm
4 Replies
Login or Register to Ask a Question