Re: FTP Root directory

Giganews Newsgroups
Subject: Re: FTP Root directory
Posted by:  Remy Lebeau (TeamB) (gambit…
Date: Wed, 10 Sep 2003

"Marco Branco" <a180…> wrote in message
> I set the ftp root directory to x:\ftp.
> How could i prevent of go above ftp, for example to x:\?

I assume you are referring to TIdFTPServer?  If so, then just use the
OnChangeDirectory event to control where the user is allowed to go.  For
every navigation that the client requests, the OnChangeDirectory event will
trigger.  You can compare the user's request to the CurrentDir property,
decide where the user is trying to go, and then allow or deny it on a
per-request basis.


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system
Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/03



In response to

FTP Root directory posted by Marco Branco on Wed, 10 Sep 2003