FTP

Colin Dente dente at s2.uucp
Fri Apr 21 01:47:34 AEST 1989


In article <43200074 at uicsrd.csrd.uiuc.edu> kai at uicsrd.csrd.uiuc.edu writes:
>
>> /* Written 12:16 pm  Apr 14, 1989 by ntm1169 at dsacg1.UUCP in uicsrd.csrd.uiuc.edu:comp.unix.wizards */
>>
>>    How can you set up a script to do anonymous FTP at night, when the
>>    network traffic is lighter?
>
>It is possible to do this, but not too secure, since you have to put the
>password in a file.  It also has no capability for handling any random errors.
>
Surely it doesn't have to be *that* unsecure, as if you have a .netrc file
containing the line:
machine machinename login myaccountname password mypassword, then you can get 
away with something like:
	#!/bin/sh
	ftp << EOM
	cd comp.sources.unix/volume17/screen
	mget *
	bye
	EOM
	exit

(The point being that .netrc has a mode of 500 or something like that - but
then again, what's wrong with you original script being 700 - unless you can't
trust root - but then you might as well give up and go home (or give root the
sack)).
I know this works 'cos I regularly use something very similar for printing
files on one machine on another machine's printer (the machine with the printer
is an Apollo running the Aegis print server which doesn't allow remote spooling
... unless I've missed something, that is...)

However - and this is a rather major however - isn't the whole point of 
anonymous ftp (which is what the original article refers to) that you can
get things without the honour of having an account on the relevant machine
- so there is no security risk, as there is no password to hide - your script
becomes something like:

	.
	.
	.
	ftp -n << EOM
	open illustriousmachinefullofarchivesi'dlovetogetholdof
	user anonymous (or guest or whatever) anyoldcrapforapassword
	.
	.
	.

(Sorry about the vagueness about anonymous ftp - but being the wrong side
of 'the pond' I don't have much call for such things - my machine may well
have an official internet address - but I can't use it - moan moan grumble
grumble grumble....)

(Still true about the random errors though.......)
(oh, and it goes without saying? you use at to run it in the wee small hours..)

Colin



=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| Colin Dente                      | JANET: dente%s2 at uk.ac.man.cs.ux          |
| Dept. of Electrical Engineering  | ARPA:  dente%s2%man.cs.ux at ukacrl.BITNET  |
| University of Manchester         | UUCP:  ...!mcvax!ukc!man.cs.ux!s2!dente  |
| England                          |                                          |
|-----------------------------------------------------------------------------|
|   =======================================================================   |
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



More information about the Comp.unix.wizards mailing list