Stripping/Prevent CRLF

Peter Samuelson peter at
Sat Mar 11 06:39:29 GMT 2000

[Chuck Carson]
> I thought I had read somewhere that you can prevent the adding of the
> ^M's when copying a file to a samba share.

Samba *never* alters file contents.  Thus it never adds ^M to files.
Unlike FTP, SMB has no notion of text files versus binary files --
everything is treated as "binary".

The topic does come up occasionally -- should Samba make an effort to
detect text files and convert line endings back and forth?  Most people
say no, because it will never guess correctly 100% of the time.  A few
say there should be a per-share config option to treat *all* files as
text.  This would be a performance hit, mind, but some say it would be

> I have a constant need to transfer excel files containing data to be
> uploaded and want to use samba to get these to the server. Can this
> be configured into Samba. I am using 2.0.6 on Solaris 2.6. When using
> Hummingbird NFS, the files will copy correctly, however, we have
> decided to use Samba for free.

If ever you experience data corruption, i.e. a file is not *exactly*
the same between client and server, you should report it as a bug.


More information about the samba mailing list