Subject: RE: ftpconversions

From: "Walton, David" <[email-masked]>
Date: Fri, 28 Feb 1997 07:30:06 -0800

Having a hidden directory isn't really an issue.  I can have the perl
script get its source file from somwhere completely outside of the FTP
directory tree.  However, the file extension is a problem.  I expect
many of our visitors will be using GUI-based FTP clients that only allow
point-and-click interaction, so they won't be able to modify the
filename.  I was hoping that something like this would do the trick:

 :.fl: :.fl:/bin/program %s:...
	or
 : : : :/bin/program %s...

but I suspect that ftpd won't run a conversion if the requested filename
exists.  

What if I set the source file to -r--------?  Would that be enough to
trigger the conversion?  ('fraid I don't have a machine to test on at
the moment.)

Any other suggestions are always welcome...

Dave

> -----Original Message-----
> From:	[email-masked]
> [SMTP:[email-masked]] On Behalf Of Bob Luckin
> Sent:	Thursday, February 27, 1997 6:08 PM
> To:	[email-masked]
> Subject:	Re: ftpconversions
> 
> Alain  suggested :-
> > >I'm trying to figure out a way to set up an FTP server that will
> run a
> > >perl script to modify certain files before they are sent, while
> > >preventing any access to the original files.  Ideas, anyone?
> > 
> > You could add a rule in ftpconversions for certain
> > extension ex: .fl
> > 
> >  :   : :.fl:/bin/program %s:.....
> > 
> > if you have:
> > /home/ftp/pub/file <----- an empty/dummy file
> > /home/ftp/pub/.hidden/real.file <---- the real file :-)
> > 
> > when the client issued
> > ftp>get file.fl
> > the conversion mechanism should be trigger
> > and the client should receive the stdout of program
> 
> One trouble with this is that if a user lists the pub directory (at
> least
> with the dir command) they may see the ".hidden" directory, and go in
> there
> and pull the real file directly, skipping the conversion.  But you can
> partially get round this by making the directory searchable but not
> readable
> (d--x--x--x, or drwx--x--x).  Then they will at least have to be
> clever
> enough to guess that there is a "real.file" inside (ie. know what name
> to
> use).
> 
> Another problem is that some users will list pub, see the empty file
> and
> try to get that instead of file.fl - ending up with an empty file.  If
> you
> have users who don't fully read the instructions you send them, and
> just cd
> to the directory and pull what they see there, you're likely to end up
> having
> to deal with a number of complaints about empty files.  The same is
> true if
> your users tend to browse around the system and pull any files they
> see
> with interesting names...
> 
> But if you can live with this, then I think Alain's suggestion will
> work
> (bon idee !) - but his disclaimer also applies to me  :-).
> 
> Cheers, Bob
> -- 
> Bob Luckin      [email-masked]      "A man, a plan, a canal, Suez !"