1 - How it works


The virtual file system allows you to map virtual directories to physical directories.
This permits sharing files and directories to your users via their accounts.

432x353 (6834 bytes)

 2 - Available resources


Local file system : c:\.. (windows File System)
Merge file system : merge:// (merging directory)
Memory file system : Ramdisk:// (ram disk)
Remote resource via FTP : ftp:// login:password@ip/ (FTP server resource), ftps:// (Implicit SSL), ftpse:// (Explicit SSL)
Empty : Empty:// (creates an empty virtual directory, useful for mounting different directories in a root directory)

You can also use UNC (\\computer\) to mount a directory in the user account.
(Note : NT local system account (default service account) has no access to network or mapped drive, so you will need to define a new user that has access to the network in service properties.)

Note about "merge://" :
- you can merge as many folders as you want.
- if the path contains comma, quote it : "c:\ftproot\files, datas\"
- duplicates files or sub folders will only be listed once.
- sub directories duplicates will also be merged.
- access rights applies to all the merged directories.
- uploading/dir creation will always be made in the first folder from the merge list.
- when deleting, the server will browse each folder until it finds the files; if there are duplicates, the file will only be deleted once which means it can still appears in the list (in this case it will listed from another folder).

 3 - Access rights


File level :
- Download : user can read files from the server.
- Upload : user can write files to the server.
- Delete : user can delete files from the server.
- Append : user can resume a file upload.

Folder level :
- List files : user can see files listing.
- List folders : user can see directory listing.
- Make : user can create folders on the server.
- Remove : user can remove folders on the server.
- Subdirs : user can go in subdirectory of current directory.
- Hide : user will not see the directory.
- Secure : user will need encrypted session (ssl) to enter this directory.
- Deny : user will be denied access to this directory.

- All : give all access.

Examples

1) You would like to create an anonymous account on your server.

In access rights you specify :

Virtual path : /
Real path : c:\ftproot\anonymous\
Access rights : Read, List files, List folder, Subdirs.

A more evolved solution :

Virtual path : /
Real path : empty://
Access rights : List folder, List files, Subdirs (empty:// only contains other mappings so no writing)

Add another one :

Virtual path : /public
Real path : c:\ftproot\anonymous\
Access rights : Download, List files, List folder, Subdirs.

2) how to give all your users a custom upload folder and a general download access.

a) Give everyone a root

Virtual path : /
Real path : empty://
Access rights : Download, List folder, List files, Subdirs

b) Setup general download folder

Virtual path : /download
Real path : c:\ftp\download
Access rights : Download, List folder, List files, Subdirs

c) Setup a custom upload folder

Virtual path : /upload
Real path : c:\ftp\upload\$USR_ACCOUNT\
Access rights : Download, Upload, Delete, List folder, List files, Make, Remove, Subdirs
(do not forget to create the c:\ftp\upload\$USR_ACCOUNT\ folder, at runtime $USR_ACCOUNT is replaced by the account name).

d) (optional) Make upload directories readable for others.

Virtual path : /download/others
Real path : c:\ftp\upload\
Access rights : Download, List folder, List files, Subdirs

3) Merging several directories into one (useful when you have limited space on drive)

Virtual path : /
Real path : merge://"c:\images\buildings\","d:\images\houses\","e:\images\flowers\"
Access rights : Download, List folder, List files, Subdirs

 4 - Additional


Tags

When defining access rights, you can also use tags (see : Tags) to dynamically mount a directory depending on user account name for example (tags can be used in virtual and physical directory).

You can create : "c:\ftp\$DOM_NAME\$USR_ACCOUNT\" mounted in "/" with proper access rights.
When you login the server will search for your root directory in c:\ftp\ftp.gene6.com\anonymous\ (if you connect under anonymous on "ftp.gene6.com" domain)

Variations are possible, example : "c:\ftp\$USR_GROUP\" mounted in "/$USR_GROUP" to access files shared among the group.

Special mapping

Moving files in your ftp folder can make old direct links unavailable, users can not download files until the links are updated.
To solve this problem you can create mapping for files (just like a redirect in http, but transparently).

Let's take an example :

- you are distributing a setup file named with version number "setup_v1.0.0.exe" located in "c:\ftproot\www.yoursite.com\files\"
- a new version is released, so the file is now named "setup_v2.0.0.exe", all sites linking directly to your files need to update their download links (this can take some time ...)

The solution is to create a new access right like this :

virtual path : /files/setup_v1.0.0.exe
physical path : c:\ftproot\www.yoursite.com\files\setup_v2.0.0.exe
access rights : same as the original folder.

So when a user requests "setup_v1.0.0.exe", though the file does not exist anymore, it is served with content of "setup_v2.0.0.exe"
(limitation : the file is still named "setup_v1.0.0.exe" on user side unlike http where you can redirect to a new file).

This can also work if you move your files to another folder :

virtual path : /old_location/setup.exe
physical path : c:\ftproot\www.yoursite.com\new_location\setup.exe
access rights : same as the original folder.

The file will still be available and listed virtually in /old_location/ but it will only be physically present in \new_location\