[Samba] Re: Incorrect format of Text

Rashkae rashkae at tigershaunt.com
Fri Aug 15 19:01:44 GMT 2003


Indeed, a more complete explanation:

The text file format is, believe it or not, different
between Windows and Unix.

In Windows, lines end in CR and LF (or maybe that's LF and
CR, whatever).  In Unix there is only a LF, the CR
is assumed.  (Carriage Return and Line Feed.)

FTP will usually tranfer text files in text mode, wich will
automatically translate files between the systems.

Most system have some kind of todos program that will
convert a text file from Unix to MS format.  If not, you can
use ftp to tranfer the files to a Windows machine, then copy
them back to the Unix share via Samba.

Note: Samba cannot, nor will it likely ever, mangle the
contents of files to translate 'on the fly'.

Note also that Word Pad on Windows doens't seem to have
trouble reading Unix formatted files.  This usually becomes
a problem with .BAT files (ex: logon scripts) that must be
in DOS format to execute properly.

On Fri, 15 Aug 2003, Failed Access wrote:

Sounds like line feeds.
Try opening the files in a proper text editor, jedit being the first one
that springs to mind and check to see if they look correct.

Mario Valetti wrote:
> Hi,
>
> I am running Samba 2.2.8a on Solaris 8, and have shared out a directory
> containing some simple text files.
>
> The issue I am experiencing is the following:
>
> If the files are FTP'd from the Unix box to a Windows machine and opened
> using Notepad, the formatting is correct.  If the same files are either
> opened directly or copied (from the Samba share) from the Unix box to the
> Windows machine, and again  opened in Notepad, the formatting of the file is
> completely messed up.
>
> I have noticed, looking at the properties of the files from the windows box,
> that there is a size difference between the files that are FTP'd and those
> from the Samba share.
>
> I am sure this has something to do with it.
>
> One of those files details:
>
> File through Samba share reads - 3.24 KB (3,319 bytes)
> The same file Ftp'd reads - 3.37 KB (3,451 bytes)
>
>
> Any comments on where I could start (besides getting rid of Windows) would
> be appreciated.
>
>
> Thanks,
> Mario


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba




More information about the samba mailing list