Robert Waldner said: > On Thu, 27 Jan 2000 10:55:13 +1300, [EMAIL PROTECTED] writes: > >When copying passwd files (ie smbpasswd, passwd, group, shadow) from one= > >machine to another via ftp... should it be via ascii or binary mode???? > > When in doubt always use binary mode, so your files get transported byte = > per byte, no matter what their content.
To reply a little more completely, ASCII mode exists primarily to allow text files to be transferred properly between systems with dissimilar line end markers. (DOS/Windows uses a CR/LF pair to indicate the end of a line of text, *nix uses just LF and Macs use just CR. ASCII mode translates between these options.) Therefore... - When copying a non-text file, you must always use binary mode. If you use ASCII mode, it will almost certainly be damaged beyond easy repair. - When copying any file (text or not) between two systems which are both running the same OS, binary mode will always work. - When copying a text file between two systems running different operating systems, ASCII mode will make your life easier, but, if you use binary mode, the worst that will happen is that you'll have to manually convert the line ends. (The most common case of this is text files transferred from a DOS system to a *nix box and growing a "^M" at the end of each line.) passwd files are plain ASCII text, so (provided you're transferring from one *nix system to another) either transfer mode will work fine for you. -- Geek Code 3.1: GCS d- s+: a- C++ UL++$ P+>+++ L++>++++ E- W--(++) N+ o+ !K w---$ O M- !V PS+ PE Y+ PGP t 5++ X+ R++ tv- b++ DI++++ D G e* h+ r++ y+