Serving only certain files from a directory to users on IIS7
Posted
by
HarbingTarbl
on Server Fault
See other posts from Server Fault
or by HarbingTarbl
Published on 2012-09-20T00:19:20Z
Indexed on
2012/09/20
3:39 UTC
Read the original article
Hit count: 438
iis7
|symbolic-link
I'm have a need to show the most up to date version of a certain file in a directory to users who access a folder on my site (lets call this folder logs). I can't just move the file into the folder as another process relies on being able to find and edit this file while it is running.
At first I had thought I could just create a folder on my site, give it the correct permissions and then create a symbolic link to the file. However it seems IIS7 does not follow symlinks.
Another solution would be to create a phpscript that pulls the correct file and displays it, but that felt like over-engineering the solution.
I know that on Apache this would be simple, but I can't figure out how to do it with IIS7.
To give an idea of the folder structure I'm working with. The directory looks like this.
Root
--File I need to serve.
--File containing plain text passwords.
--Other folders/files.
I can't move any of these files. If I just serve the entire directory using Virtual Directories in IIS I'll also be sharing files and folders containing configuration and other sensitive information.
© Server Fault or respective owner