Creating Virtual FTP Directories (Windows Embedded CE 6.0)
1/6/2010
Windows Embedded CE enables you to create virtual FTP directories. Virtual directories appear to users who access your FTP site as a subdirectory of the FTP site's home directory, although they may be located in a different folder.
For example, if the FTP directory on your Windows Embedded CE-based device is set to the \Hard Disk\Ftproot directory, and your music files are stored under the \Hard Disk\Music folder, you can add the Music folder as a virtual root to the Ftproot directory. You create a virtual directory for the Music folder by associating the FTP virtual directory \Music with the real \Hard Disk\Music directory.
When users log onto the FTP server, they will see the Music folder in the FTP root directory and will be able to navigate to this folder as if it were actually located in the \Hard Disk\Ftproot\Music directory instead of in the \Hard Disk\Music directory.
You can only create virtual FTP directories at the root FTP directory. You cannot add nested or duplicate virtual roots, or separate virtual roots for folders that are children of another virtual root.
If you know the folder structure of your FTP server, you can create virtual directories by configuring the registry before you build your run-time image.
To create FTP virtual directories during the build process
After you have created your initial OS design, in Platform Builder under the Project Specific Files node, double-click the Project.reg file.
Add the following registry entry to the Project.reg file. Note that the virtual directory name after "VROOTS\" must begin with a slash (/).
[HKEY_LOCAL_MACHINE\Comm\FTPD\VROOTS\</virtual_dir_name>] @="<real_path_name>"
For example, to create a virtual directory for the Music folder, add the following syntax to Project.reg:
[HKEY_LOCAL_MACHINE\Comm\FTPD\VROOTS\/Hard Disk\Ftproot\Music] @="\Hard Disk\Music"
From the Build menu choose Build Platform to build your run-time image.
You can also use the registry to grant or deny anonymous user access to virtual directories by setting the value for the AllowAnonymousVroots subkey in the [HKEY_LOCAL_MACHINE\Comm\FTPD] registry key.
To deny an anonymous user access to an FTP virtual root, set the value of the AllowAnonymousVroots subkey to zero (0). To grant a specific user access to FTP virtual roots, set the value of the AllowAnonymousVroots subkey to 1.
See Also
Concepts
FTP Server Application Development
FTP Server Registry Settings