Tech Line

Linkd to the Rescue

Here's a nifty Resource Kit tool that solves a reader's FTP server space problem.

Chris: I'm about out of space on my Windows 2003 FTP server. I created a folder on another hard disk on the server and planned to use it to store additional files. I thought that I could just create a folder shortcut from my existing FTP root folder and that would allow users to see the new folder and files. When I connected to the server using a command line FTP session, the shortcut appears as a .lnk file. So I can't see or connect to the new folder. I really don't want to create another FTP site for the new folder and want everything to stay under a single FTP root. What else can I do?
-- Alex

While folder shortcuts work great in Windows Explorer, as you've found, FTP clients cannot follow them. Keeping your FTP directory contained within a single drive or RAID set is always ideal. However, if resources are limited and you need to expand a folder structure to traverse subfolders of other drives, then creating junction points is a good alternative.

To keep it simple, a junction point is an empty folder on a system's local drive that transparently links to another storage location (drive or folder) on the same system. With a junction point, you can link an empty folder in your FTP server's root directory to another folder on your server's G drive, for example. Junction points cannot link to resources on another system, such as shared folders. The only way around this is to employ a storage networking protocol such as iSCSI.

To create a junction point you can use linkd, which is a tool included in the Windows Server 2003 Resource Kit Tools. Here is the general syntax for Linkd:

linkd <source folder> <target folder>

The <source folder> parameter is the path to the folder that links to another folder. The <target folder> parameter specifies the link destination of the source folder.

Once you download and install the resource kit tools on your server, follow these steps to create a junction point that links an FTP root subfolder to the new storage location:

  1. Open Windows Explorer, navigate to the FTP root folder and create a new subfolder within the root folder. If you are unsure of which folder is the FTP root folder, open IIS Manager, expand FTP sites, right-click on the Default FTP Site, and select Properties. Then click the Home Directory tab and you will see the FTP root directory listed in the Local Path field.
  2. When the Windows Resource Kit Tools are installed, the system path is updated so that each tool can be executed from anywhere in the command prompt. If you just installed the Resource Kit Tools and have yet to reboot the server, then you need to run the tool from the Resource Kit Tools installation folder. To be safe, let's assume that the server has not been rebooted. So, open the Command Prompt and navigate to the Resource Kit Tools installation folder (by default, this is "C:\Program Files\Windows Resource Kits\Tools").
  3. Now, you can run the linkd command to create the junction point. Let's assume that your FTP server was deployed with the default settings (root directory = C:\intetpub\ftproot), that you created an ftproot subfolder named "morestuff" and that wish to link the folder to the G:\software folder. To create the junction point, just run the command
    linkd c:\inetpub\ftproot\morestuff G:\software

With the junction point created, when FTP users connect to your server, they will see a folder named "morestuff." If they navigate to the "morestuff" folder, they will then see the contents of the G:\software software (although from their view it looks as though they are viewing the "morestuff" folder's contents). Note that you may need to adjust the permissions of the G:\software folder so that FTP users can access files within that directory.

Tech Help—Just An
E-Mail Away

Got a Windows, Exchange or virtualization question or need troubleshooting help? Or maybe you want a better explanation than provided in the manuals? Describe your dilemma in an e-mail to the MCPmag.com editors at editor@mcpmag.com; the best questions get answered in this column and garner the questioner with a nifty Redmond T-shirt.

When you send your questions, please include your full first and last name, location, certifications (if any) with your message. (If you prefer to remain anonymous, specify this in your message, but submit the requested information for verification purposes.)

Junction points are helpful, and can get you out of binds such as the one that Alex is in. However, you do need to be careful. Folder permissions do not follow junction points, so any permissions set at the FTP root folder level or at the junction source folder do not propagate to the junction point target folder and its contents.

Although junction points do create additional administrative concerns such as permissions management, they are a valuable resource when trying to maintain a single folder hierarchy for system files and folders.

About the Author

Chris Wolf is a Microsoft MVP for Windows --Virtual Machine and is a MCSE, MCT, and CCNA. He's a Senior Analyst for Burton Group who specializes in the areas of virtualization solutions, high availability, storage and enterprise management. Chris is the author of Virtualization: From the Desktop to the Enterprise (Apress), Troubleshooting Microsoft Technologies (Addison Wesley), and a contributor to the Windows Server 2003 Deployment Kit (Microsoft Press).learningstore-20/">Troubleshooting Microsoft Technologies (Addison Wesley) and a contributor to the Windows Server 2003 Deployment Kit (Microsoft Press).

comments powered by Disqus
Most   Popular

SharePoint Watch

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.