You can use a cloaking script, which is called with a set of arguments, which can firstly verify the user can download the file, together with the name of the file. Such as
/cgi-bin/cloak.cgi?user=someone&file=hidden.pdf
The hidden.pdf file can then be stored in any directory you like and only the cgi script will know it.
To add security, as some CGI directories, if not set correctly, can allow unscrupulous users to read the cgi code, you can store a config file in another directory which cannot be seen by the outside world, and use that to hold the name of the directory where hidden files are.
As an example, on one of my sites I have the following top level directories:
/cgi-bin
/conf
/download
/html
The scripts are all in /cgi-bin, and standard html are in /html, which are the only 2 directories readable via the web server. On load up I read a config file in /conf, which then tells me where inside the /download directory the required file is.
HTH,
Barbie. Leader of Birmingham Perl Mongers