Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

--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.

share|improve this question

You can create a virtual folder in IIS that can point to an arbitrary location in your filesystem. The folder must have the correct permissions set for IIS to serve it, however.

share|improve this answer
It's important that I don't show the entire folder however. I have to show only a single file from a folder containing other files and folders. – HarbingTarbl Sep 20 '12 at 1:02

IIS won't follow windows shortcuts (right click new shortcut) i'm guessing this is what your calling a symlink their not the same as a symlink in linux. IIS will follow both synlinks and junctions in a NTFS file system

windows NTFS file systems do have symlinks but they can only be created using (depending on os) linkd or mklink commands

junctions or hardlinks can me made using junction which is part of the sysinternals toolkit

share|improve this answer
I was actually using mklink from the command line to create the symlink. Neither a soft nor hard link worked, I ended up just using a php script to grab the right file. – HarbingTarbl Oct 14 '12 at 19:02
IIS doesn't follow NTFS junctions (at least not IIS 7) which would have been created with mklink – cdmdotnet Jan 6 at 21:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.